QDockWidget Class Reference
|
Константа | Значение | Описание |
---|---|---|
QDockWidget::DockWidgetClosable | 0x01 | The dock widget can be closed. |
QDockWidget::DockWidgetMovable | 0x02 | The dock widget can be moved between docks by the user. |
QDockWidget::DockWidgetFloatable | 0x04 | The dock widget can be detached from the main window, and floated as an independent window. |
QDockWidget::DockWidgetVerticalTitleBar | 0x08 | The dock widget displays a vertical title bar on its left side. This can be used to increase the amount of vertical space in a QMainWindow. |
QDockWidget::AllDockWidgetFeatures | DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable | (Deprecated) The dock widget can be closed, moved, and floated. Since new features might be added in future releases, the look and behavior of dock widgets might change if you use this flag. Please specify individual flags instead. |
QDockWidget::NoDockWidgetFeatures | 0x00 | The dock widget cannot be closed, moved, or floated. |
The DockWidgetFeatures type is a typedef for QFlags<DockWidgetFeature>. It stores an OR combination of DockWidgetFeature values.
This property holds areas where the dock widget may be placed.
The default is Qt::AllDockWidgetAreas.
Функции доступа:
See also Qt::DockWidgetArea.
This property holds whether the dock widget is movable, closable, and floatable.
By default, this property is set to a combination of DockWidgetClosable, DockWidgetMovable and DockWidgetFloatable.
Функции доступа:
See also DockWidgetFeature.
This property holds whether the dock widget is floating.
A floating dock widget is presented to the user as an independent window "on top" of its parent QMainWindow, instead of being docked in the QMainWindow.
По умолчанию это свойство равно true.
Функции доступа:
Смотрите также isWindow().
Constructs a QDockWidget with parent parent and window flags flags. The dock widget will be placed in the left dock widget area.
The window title is set to title. This title is used when the QDockWidget is docked and undocked. It is also used in the context menu provided by QMainWindow.
Смотрите также setWindowTitle().
Constructs a QDockWidget with parent parent and window flags flags. The dock widget will be placed in the left dock widget area.
Destroys the dock widget.
This signal is emitted when the allowedAreas property changes. The allowedAreas parameter gives the new value of the property.
This signal is emitted when the dock widget is moved to another dock area, or is moved to a different location in its current dock area. This happens when the dock widget is moved programmatically or is dragged to a new location by the user.
Эта функция была введена в Qt 4.3.
This signal is emitted when the features property changes. The features parameter gives the new value of the property.
Initialize option with the values from this QDockWidget. This method is useful for subclasses when they need a QStyleOptionDockWidget, but don't want to fill in all the information themselves.
Смотрите также QStyleOption::initFrom().
Returns true if this dock widget can be placed in the given area; otherwise returns false.
Sets an arbitrary widget as the dock widget's title bar. If widget is 0, the title bar widget is removed, but not deleted.
If a title bar widget is set, QDockWidget will not use native window decorations when it is floated.
Here are some tips for implementing custom title bars:
QDockWidget *dockWidget = qobject_cast<QDockWidget*>(parentWidget()); if (dockWidget->features() & QDockWidget::DockWidgetVerticalTitleBar) { // I need to be vertical } else { // I need to be horizontal }
Using qobject_cast as shown above, the title bar widget has full access to its parent QDockWidget. Hence it can perform such operations as docking and hiding in response to user actions.
Эта функция была введена в Qt 4.3.
See also titleBarWidget() and DockWidgetVerticalTitleBar.
Sets the widget for the dock widget to widget.
If the dock widget is visible when widget is added, you must show() it explicitly.
Note that you must add the layout of the widget before you call this function; if not, the widget will not be visible.
Смотрите также widget().
Returns the custom title bar widget set on the QDockWidget, or 0 if no custom title bar has been set.
Эта функция была введена в Qt 4.3.
See also setTitleBarWidget().
Returns a checkable action that can be used to show or close this dock widget.
The action's text is set to the dock widget's window title.
See also QAction::text and QWidget::windowTitle.
This signal is emitted when the floating property changes. The topLevel parameter is true if the dock widget is now floating; otherwise it is false.
Смотрите также isWindow().
This signal is emitted when the dock widget becomes visible (or invisible). This happens when the widget is hidden or shown, as well as when it is docked in a tabbed dock area and its tab becomes selected or unselected.
Эта функция была введена в Qt 4.3.
Returns the widget for the dock widget. This function returns zero if the widget has not been set.
Смотрите также setWidget().
Copyright © 2008 Nokia | Торговые марки | Qt 4.4.3 |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |