Do you add
?
- the tool button to the toolbar
- the toolbar to the main window
Do you add
?
- the tool button to the toolbar
- the toolbar to the main window
J-P Nurmi
yes i think by doing this
Qt Code:
//Toolbar btnZoom->setText("Zoom"); btnZoom->setCheckable(true); btnZoom->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);To copy to clipboard, switch view to plain text mode
toolBar = new QToolBar(this); // this should attached the toolbar to QMainWindow
QToolButton *btnZoom = new QToolButton(toolBar); // this should attached toolButton to toolBar
byt the way this class inherits QMainWindow
They get created as child widgets at location (0,0) but that's all. Use QMainWindow::addToolBar() and QToolBar::addWidget() to get them actually managed.
J-P Nurmi
Bookmarks