Results 1 to 3 of 3

Thread: QMainWindow with fixed area + Dockarea

  1. #1
    Join Date
    Aug 2009
    Posts
    92
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QMainWindow with fixed area + Dockarea

    I have to create a GUI that handles QDockWidgets but only in a part of the Mainwindow.

    As in the attached picture, there should be a fixed part on the left and a dock area on the right.
    Like qtcreator GUI, as an example, that has a fixed toolbar on the left and other panels on the right.

    How can I do that ?


    Added after 39 minutes:


    Ok, somehow I've solved but if someone has other ideas...

    I've created a toolbar fixed on the left side of the mainwindow.
    Then I've added a fixed size QDockWidget to the toolbar:
    ui->toolBar->addWidget(m_FrameContainerGUI);

    That's it, it was easy at the end.
    Attached Images Attached Images
    Last edited by trallallero; 16th March 2012 at 08:49.

  2. #2
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: QMainWindow with fixed area + Dockarea

    take a look at void setAllowedAreas(Qt:ockWidgetAreas areas)

  3. #3
    Join Date
    Aug 2009
    Posts
    92
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QMainWindow with fixed area + Dockarea

    Yes I know but if I do this:

    Qt Code:
    1. m_FrameContainerGUI->setAllowedAreas(Qt::LeftDockWidgetArea);
    2. m_FrameCreatorGUI->setAllowedAreas(Qt::LeftDockWidgetArea);
    3.  
    4. addDockWidget(Qt::LeftDockWidgetArea , m_FrameContainerGUI);
    5. addDockWidget(Qt::LeftDockWidgetArea , m_FrameCreatorGUI);
    To copy to clipboard, switch view to plain text mode 

    the widgets are on the left side but vertically aligned (one over the other).
    What I want to do is to put the first one on the left side and the second one on the left side but next to the first, not over (or under).

Similar Threads

  1. Replies: 3
    Last Post: 13th November 2011, 08:12
  2. Replies: 0
    Last Post: 22nd September 2011, 10:31
  3. Replies: 2
    Last Post: 29th June 2011, 15:45
  4. Replies: 0
    Last Post: 17th November 2010, 17:07
  5. How to make a QMainWindow fixed sized?
    By Goldmmbr in forum Newbie
    Replies: 2
    Last Post: 18th November 2009, 08:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.