Add DockWidget::open()
Show/hide/visibility is being deprecated
This commit is contained in:
@@ -411,6 +411,11 @@ QStringList DockWidget::affinities() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DockWidget::show()
|
void DockWidget::show()
|
||||||
|
{
|
||||||
|
open();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DockWidget::open()
|
||||||
{
|
{
|
||||||
if (view()->isRootView()
|
if (view()->isRootView()
|
||||||
&& (d->m_lastPosition->wasFloating() || !d->m_lastPosition->isValid())) {
|
&& (d->m_lastPosition->wasFloating() || !d->m_lastPosition->isValid())) {
|
||||||
|
|||||||
@@ -310,8 +310,16 @@ public:
|
|||||||
*/
|
*/
|
||||||
QStringList affinities() const;
|
QStringList affinities() const;
|
||||||
|
|
||||||
/// @brief Equivalent to QWidget::show(), but it's optimized to reduce flickering on some
|
/// @brief Opens this dock widget.
|
||||||
/// platforms
|
/// Does nothing if already open.
|
||||||
|
/// The dock widget will appear floating unless it knows about its previous layout position,
|
||||||
|
/// in which case it will appear docked (or tabbed) into the main window.
|
||||||
|
void open();
|
||||||
|
|
||||||
|
/// @brief Deprecated, use open() instead.
|
||||||
|
/// Visibility isn't a good concept since tabbed non-current dock widgets are not visible but
|
||||||
|
/// still open.
|
||||||
|
/// @deprecated
|
||||||
void show();
|
void show();
|
||||||
|
|
||||||
/// @brief Brings the dock widget to the front.
|
/// @brief Brings the dock widget to the front.
|
||||||
|
|||||||
Reference in New Issue
Block a user