Reimplements: QAbstractScrollArea::setupViewport(QWidget *viewport). void QMdiArea:: setupViewport( QWidget * viewport) If window is nullptr, any current active window is deactivated. void QMdiArea:: setActiveSubWindow( QMdiSubWindow * window)Īctivates the subwindow window. Subwindows that ignore the close event will remain open. You may receive subWindowActivated() signals from subwindows before they are closed (if the MDI area activates the subwindow when another is closing). void QMdiArea:: closeAllSubWindows()Ĭloses all subwindows by sending a QCloseEvent to each window. void QMdiArea:: cascadeSubWindows()Īrranges all the child windows in a cascade pattern. See also activateNextSubWindow() and QMdiArea::WindowOrder. The window activated will be the previous one determined by the current activation order. Gives the keyboard focus to another window in the list of child windows. void QMdiArea:: activatePreviousSubWindow() See also activatePreviousSubWindow() and QMdiArea::WindowOrder. The window activated will be the next one determined by the current activation order. parent is passed to QWidget's constructor. Member Function Documentation QMdiArea:: QMdiArea( QWidget * parent = nullptr)Ĭonstructs an empty mdi area. Both are slots and are easily connected to menu entries. QMdiArea provides two built-in layout strategies for subwindows: cascadeSubWindows() and tileSubWindows(). Also, it is used when cascading or tiling the windows with cascadeSubWindows() and tileSubWindows(). This is used for the subWindowList() and for activateNextSubWindow() and activatePreviousSubWindow(). The subwindows are sorted by the current WindowOrder. This information could be used in a popup menu containing a list of windows, for example. The convenience function subWindowList() returns a list of all subwindows. The MDI area emits the subWindowActivated() signal when the active window changes, and the activeSubWindow() function returns the active subwindow. The user activates a window by moving focus in the usual ways. See the QMdiSubWindow class description for more details.Ī subwindow becomes active when it gets the keyboard focus, or when setFocus() is called. QMdiSubWindow also has behavior that is specific to MDI windows. The class inherits QWidget, and you can use the same API as with a normal top-level window when programming. It is common to pass a QWidget, which is set as the internal widget, to this function, but it is also possible to pass a QMdiSubWindow directly. ![]() They are added to an MDI area with addSubWindow(). Subwindows in QMdiArea are instances of QMdiSubWindow. If a specific flag is not supported by the style (e.g., the WindowShadeButtonHint), you can still shade the window with showShaded(). Unlike the window managers for top-level windows, all window flags ( Qt::WindowFlags) are supported by QMdiArea as long as the flags are supported by the current widget style. QMainWindow *mainWindow = new QMainWindow TestOption(QMdiArea::AreaOption option) const SubWindowList(QMdiArea::WindowOrder order = CreationOrder) const SetTabPosition(QTabWidget::TabPosition position) SetOption(QMdiArea::AreaOption option, bool on = true) SetActivationOrder(QMdiArea::WindowOrder order) ![]() AddSubWindow(QWidget * widget, Qt::WindowFlags windowFlags = Qt::WindowFlags())
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |