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()
|
||||
{
|
||||
open();
|
||||
}
|
||||
|
||||
void DockWidget::open()
|
||||
{
|
||||
if (view()->isRootView()
|
||||
&& (d->m_lastPosition->wasFloating() || !d->m_lastPosition->isValid())) {
|
||||
|
||||
@@ -310,8 +310,16 @@ public:
|
||||
*/
|
||||
QStringList affinities() const;
|
||||
|
||||
/// @brief Equivalent to QWidget::show(), but it's optimized to reduce flickering on some
|
||||
/// platforms
|
||||
/// @brief Opens this dock widget.
|
||||
/// 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();
|
||||
|
||||
/// @brief Brings the dock widget to the front.
|
||||
|
||||
Reference in New Issue
Block a user