MDI or Dock Windows?

In the QT application under development, we need to display several “view windows” (for displaying data in the XY plane, YX plane, XZ plane, and in 3D).

We hoped to use the MDI application model, but later the client asked to drag and view the "viewport" on multiple desktops (using multiple monitors). This cannot be done using the MDI window model, because we cannot move the MDI window outside the main application window.

The only possible way is to use the Dock windows, because they can be undocked from the main application window and moved to other desktops, but the primary Dock windows are used for tool palettes or service windows.

( http://doc.qt.nokia.com/4.6/qdockwidget.html#details )

Is it good to use the dock window for our requirement?

+5
source share
1 answer

I would not use QDockWindow, as it seems that you will not use the client area. In addition, you do not want to dock with the borders of MainWindow, but simply added a widget to MainWindow.

I think you can try using multiple QWidget with QGridLayout. When dragging a QWidget outside of MainWindow, simply remove the QWidget from the layout. When dragging inside MainWindow, add the QWidget to the desired location in the QGridLayout. Using this method, you can also switch widget objects to the main window.

, , , QtDesigner . , .

, , .

,

+3

All Articles