Results 1 to 2 of 2

Thread: Same Width of Qt's Bottom Drawer and its parent QMainWindow

  1. #1
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Same Width of Qt's Bottom Drawer and its parent QMainWindow

    Hi

    I am using Qt 4.6.4 on MacOSX.

    QDockWidget *m_pDockWidget = new QDockWidget(this,Qt:rawer);
    MyWdgt *m_pMyWdgt = new MyWdgt(this);

    m_pDockWidget->setFixedWidth(750);
    m_pDockWidget->setFixedHeight(220);

    m_pDockWidget->setWidget(m_pMyWdgt);
    this->addDockWidget(Qt::BottomDockWidgetArea,m_pDockWid get);

    It Start showing Drawer After Bottom of QMainWindow. But Drawer's width is not same as QMainWindow's width.

    I want to set Same Width as QMainWindow. But it always some width less than QMainWindow.

    I have attached sample Screen. Kindly tell me the solution for this.

    Thanks
    Santosh
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Same Width of Qt's Bottom Drawer and its parent QMainWindow

    Maybe this has something to do with it:

    Qt Code:
    1. m_pDockWidget->setFixedWidth(750);
    2. m_pDockWidget->setFixedHeight(220);
    To copy to clipboard, switch view to plain text mode 

    As far as I can tell from your screen shot, your dock widget is not docked at the bottom of your main window. It is floating in the area below it, which means it will take whatever size you have set it to or the size of its contents if you don't set a size.

Similar Threads

  1. Replies: 1
    Last Post: 12th June 2014, 06:40
  2. Replies: 1
    Last Post: 25th May 2010, 14:44
  3. Replies: 1
    Last Post: 17th May 2010, 10:40
  4. Replies: 1
    Last Post: 18th February 2009, 08:34
  5. how to show Dialog as drawer on the bottom of the parent screen?
    By vishal.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 7th March 2008, 08:00

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.