Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved] - How to create a GUI consisted of MdiArea as central widget and two docked widgets?
Forum Updated to NodeBB v4.3 + New Features

[solved] - How to create a GUI consisted of MdiArea as central widget and two docked widgets?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.4k Views 1 Watching
  • 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.
  • L Offline
    L Offline
    lhb007
    wrote on last edited by
    #1

    Hello all,

    I'm new to Qt programming framework. I would like to create a GUI interface with a MdiArea widget as its central widget and two other docked widget on the left and bottom.
    I can do this if I use stack widget or textEdit widget as its central widget, but I don't have any luck with Mdi widget as central widget.

    I would like to use MdiArea as central widget so that I’d be able to open multiple textEdit and TableView screens and organize them in cascade and tile format.

    I'm wondering whether it is not possible to have a combination of MdiArea as central widget and two docked widgets using Qt widgets and classes or there's something wrong with my code.

    Your help and feedbacks are highly appreciated.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      QMainWindow is what you are looking for.

      Search for the MDI example in Qt's documentation. It shows what you want to do with the MDI area. The dock widget part is covered in QMainWindow's documentation as well as QDockWidget's

      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

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lhb007
        wrote on last edited by
        #3

        Hi SGaist,

        Thanks for your reply. I have gone through MDI and QDockWidget examples. I can complie my code, but my application doesn't open and bug report window pops up when I run it.

        When I comment out createMenus() line my application opens, but when I close it bug report window pops up.

        Any idea what could cause this issue? Thanks

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Without any code it's pretty much Crystal Ball debugging. Please show the content of createMenus

          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
          0
          • L Offline
            L Offline
            lhb007
            wrote on last edited by
            #5

            Hi SGaist,

            After I created a cleen project, it worked. I think my project *.pro file was messed up.

            Thanks for your help and feedback

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              You're welcome !

              Since it looks like you have everything running now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

              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
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved