psih128
17th November 2009, 16:54
Hi
I'm having problems with QMainWindow::addToolbar QMainWindow::removeToolbar functons.
In my application I have couple toolbars which are added/removed, depending on the active application mode (I want to have the toolbars removed from the main window completely, not just hidden with the toggle action). And here the problems begin. as soon as the toolbar is added/removed once, it quits working at all - I call addToolbar, nothing happens.
Here is he code to add/remove toolbar:
ui->pushButton_1->isChecked() ? this->addToolBar(t1) : this->removeToolBar(t1);
I'm attaching a sample qt project (just run qmake/make).
Please hint me whether it's my problem, or a bug on Qt side, I'm on Qt 4.5.2
Thanks
Anton
Edit: same issue in Qt 4.6 Beta
I'm having problems with QMainWindow::addToolbar QMainWindow::removeToolbar functons.
In my application I have couple toolbars which are added/removed, depending on the active application mode (I want to have the toolbars removed from the main window completely, not just hidden with the toggle action). And here the problems begin. as soon as the toolbar is added/removed once, it quits working at all - I call addToolbar, nothing happens.
Here is he code to add/remove toolbar:
ui->pushButton_1->isChecked() ? this->addToolBar(t1) : this->removeToolBar(t1);
I'm attaching a sample qt project (just run qmake/make).
Please hint me whether it's my problem, or a bug on Qt side, I'm on Qt 4.5.2
Thanks
Anton
Edit: same issue in Qt 4.6 Beta