oh, I am sorry once again
It should be
void MainWindow::addButton()
{
}
void MainWindow::addButton()
{
QToolButton* tb = new QToolButton(this);
}
To copy to clipboard, switch view to plain text mode
Actually I got confused because of the QToolBar consstructor that your are using.
The constructor that you are using is obsolete
void MainWindow::addToolBar()
{
QToolBar* toolbar_but
= new QToolBar("Open puctures",
this, DockLeft ,
TRUE ,
0);
// this is obsolete
}
void MainWindow::addToolBar()
{
QToolBar* toolbar_but = new QToolBar("Open puctures",this, DockLeft , TRUE ,0);// this is obsolete
}
To copy to clipboard, switch view to plain text mode
you should rather be using
void MainWindow::addToolBar()
{
toolbar_but->setLabel("Open Pictures");
}
void MainWindow::addToolBar()
{
QToolBar* toolbar_but = new QToolBar(this,0);
toolbar_but->setLabel("Open Pictures");
}
To copy to clipboard, switch view to plain text mode
or may be the other one according to your need.
Bookmarks