How to make Floating tool bar in Qt, just like the top floating panel of Microsoft Windows RDP client, any code example? Regards
A:
I'd do it myself - from scratch. AFAIk none of the existing Qt widgets will give you what you want. However, it should be trivially easy to subclass QWidget and create your own.
Thomi
2009-08-27 08:42:58
the main window of my application is child of QWidget, how to make toolbar the child of QWidget???
Ummar
2009-08-27 08:54:07
+4
A:
Inside your QMainWindow derived class:
QToolBar* pToolBar = new QToolBar(this);
pToolBar->setAllowedAreas(Qt::NoToolBarArea);
pToolbar->setFixedWidth(300);
pToolBar->setFixedHeight(50);
/* add actions to pToolBar here */
addToolBar(Qt::NoToolBarArea, pToolBar);
ttvd
2009-08-27 09:01:58