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. How to get the relationship between two QDockWidget?
Forum Updated to NodeBB v4.3 + New Features

How to get the relationship between two QDockWidget?

Scheduled Pinned Locked Moved General and Desktop
16 Posts 4 Posters 4.7k 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.
  • A Offline
    A Offline
    andre
    wrote on last edited by
    #7

    [quote author="Franzk" date="1313503030"]Use "QMainWindow::saveState()":http://doc.trolltech.com/latest/qmainwindow.html#saveState and "QMainWindow::restoreState()":http://doc.trolltech.com/latest/qmainwindow.html#restoreState for that sorta thing.[/quote]

    Indeed: that's why I asked :-)

    1 Reply Last reply
    0
    • Y Offline
      Y Offline
      yunxiaodong
      wrote on last edited by
      #8

      I make a layout manager which can modify the achieved xml .This layout manager is for Users,Users can use manager layout QDockwidgets by their way. Then the application can layout QDockwidgets according the achieved xml.

      I love peace.

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        yunxiaodong
        wrote on last edited by
        #9

        QMainWindow::saveState() and restore function cant fit.

        I love peace.

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          yunxiaodong
          wrote on last edited by
          #10

          may be i have a bad english expression,i should study hard.

          I love peace.

          1 Reply Last reply
          0
          • F Offline
            F Offline
            Franzk
            wrote on last edited by
            #11

            As far as I know, saveState()/restoreState() is the only way of accessing this. Why do you want to manage this from a layout manager when QMainWindow does it for you already?

            "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • Y Offline
              Y Offline
              yunxiaodong
              wrote on last edited by
              #12

              now, i can save QToolBar,QMenu state and restore them well,but cant restore QDockwidget well only.
              For different users or industry, i support application with different layout.

              I love peace.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andre
                wrote on last edited by
                #13

                If all else fails: the sources of Qt are available to you. Check how saveState() and restoreState() are implemented, and perhaps you'll find something you can use. You might need to use undocumented or even expose private functionality to pull it off that way. Perhaps even a modification of Qt itself is needed. If you implement that nicely, you could try to have that merged in as a patch (if you can give a good use case for it).

                1 Reply Last reply
                0
                • Y Offline
                  Y Offline
                  yunxiaodong
                  wrote on last edited by
                  #14

                  Good idea. Actually I have saw the saveState() and restoreState() source code for several times. It is based on too much Qt's private implemention. It use many classes(not api) which derived from QLayout to implement this.I will continue to study.

                  I love peace.

                  1 Reply Last reply
                  0
                  • Y Offline
                    Y Offline
                    yunxiaodong
                    wrote on last edited by
                    #15

                    ok

                    I love peace.

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      andre
                      wrote on last edited by
                      #16

                      Please use the edit option next to your post to make spelling corrections or additions instead of making new posts.

                      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