1 Attachment(s)
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::Drawer);
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
Re: Same Width of Qt's Bottom Drawer and its parent QMainWindow
Maybe this has something to do with it:
Code:
m_pDockWidget->setFixedWidth(750);
m_pDockWidget->setFixedHeight(220);
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.