Several dock-related questions
I want to define in QT Designer an area tied to a single document, where the user can work with various different editors (I am making a game mod editor for a existing game).
For example all file formats will support at least a raw text editor, a hex editor, and whatever editor is associated with the file (a PNG viewer for example, or a script editor with syntax highlighting, or for GUI files it will support a XML editor and a visual GUI editor)
I want to make the user be able to either drag all editors on top of the other, and create tabs (reordering tabs by drag and drop would also be awesome), or able to drag editors in a way that splits the docking area, so they can see for example the hex editor and the raw text editor side by side, and then be able to turn those in tabs too (for example drop the XML editor over the raw text editor, creating 2 tabs on one side, and then drop the visual GUI editor over the hex editor, creating another 2 tabs in the other side).
How I do that?
I knwo it is possible, because IDA Pro with Qt interface can do it for example.
Hi and welcome to devnet,
Sounds like a QMainWindow with QDockWidgets with QMainWindow's dockNestingEnabled property set to true. From there you have the functionality you're looking for.
Hope it helps
@SGaist how I do that NOT on the QMainWindow?
I want to do this in a widget (that will be used as the central widget of the main window).
In fact I don't found how to use ANY kind of docking beside the main window one :/
QDockWidget and QMainWindow are tied. That doesn't prevent you to use another QMainWindow as a central widget for your QMainWindow even though that would be a bit strange.
Note that if you only want to work with dock widgets nothing forbids you to not use any central widget.