Add DockWidget::Option_NonDockable

A dock widget with this option will always be floating and not be
able to dock into anything. Other widgets can't dock into it either.
This commit is contained in:
Sergio Martins
2020-04-13 12:45:35 +01:00
parent 899ca6af6a
commit ab0fc1e328
11 changed files with 104 additions and 13 deletions

View File

@@ -69,7 +69,8 @@ public:
///@brief DockWidget options to pass at construction time
enum Option {
Option_None = 0, ///< No option, the default
Option_NotClosable = 1 /// The DockWidget can't be closed on the [x], only programatically
Option_NotClosable = 1, /// The DockWidget can't be closed on the [x], only programatically
Option_NotDockable = 2 ///< The DockWidget can't be docked, it's always floating
};
Q_DECLARE_FLAGS(Options, Option)
@@ -180,7 +181,10 @@ public:
Options options() const;
/**
* @brief Setter for the options
* @brief Setter for the options.
* Only Option_NotClosable is allowed to change after construction. For the other options use
* the constructor only.
*
* @sa options(), optionsChanged()
*/
void setOptions(Options);