Results 1 to 3 of 3

Thread: Dock Widgets Example Question

  1. #1
    Join Date
    Jun 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Question Dock Widgets Example Question

    I read http://doc.qt.nokia.com/latest/mainw...ckwidgets.html and would like to create an UI exactly like it.

    Except:
    1. centralWidget “Letter” put on right hand side, 2 DockWidgets “Customers” and “Paragraphs” put on left hand side.
    2. There is a bottom DockWidget.

    However, the following code put “Customers” on left hand side, “Letter” on the central, “Paragraphs” on the right hand side.

    How should I change the code to fix the layout problem?

    Qt Code:
    1. QFrame *frame = new QFrame( this );
    2. QLayout *layout = new QVBoxLayout( frame );
    3. frame->setLayout( layout );
    4. layout->addWidget( &m_Main );
    5. setCentralWidget( frame );
    6.  
    7. m_A = new A( this );
    8. addDockWidget( Qt::LeftDockWidgetArea, m_A );
    9.  
    10. m_B = new B( this );
    11. addDockWidget( Qt::LeftDockWidgetArea, m_B );
    12.  
    13. m_C = new C( this );
    14. addDockWidget( Qt::BottomDockWidgetArea, m_C );
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Dock Widgets Example Question

    Coud you post a screen shot of how you want, what u are getting.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Dock Widgets Example Question

    Check the allowed dock areas for each widget.

Similar Threads

  1. Can I Programatically Overlap Dock Widgets?
    By bieber in forum Qt Programming
    Replies: 0
    Last Post: 29th June 2010, 19:42
  2. resizeEvent for Dock Widgets
    By umulingu in forum Qt Programming
    Replies: 3
    Last Post: 1st April 2010, 11:30
  3. Dock widget between widgets, not near the border
    By maverick_pol in forum Qt Programming
    Replies: 0
    Last Post: 22nd May 2009, 13:23
  4. Dock widgets PROBLEM
    By L1L0 in forum Qt Programming
    Replies: 8
    Last Post: 7th April 2006, 18:29
  5. How to movable dock widgets?
    By becond in forum Qt Tools
    Replies: 3
    Last Post: 21st February 2006, 19:57

Tags for this Thread

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.