How to create a floating toolbar in Qt 4.5.2
How do I make a floating toolbar in Qt like the top floating toolbar of the Microsoft Windows RDP client, some sample code? Relations
+2
Muhammad ummar
source
to share
2 answers
Inside your derived QMainWindow 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);
+4
ttvd
source
to share
I would 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 a QWidget and create your own.
0
Thomi
source
to share