Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Several dock-related questions

    Tools
    qdockwidget qtabwidget
    2
    4
    1246
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Speeder
      Speeder last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        Speeder 1 Reply Last reply Reply Quote 0
        • Speeder
          Speeder @SGaist last edited by

          @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 :/

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • First post
              Last post