Results 1 to 3 of 3

Thread: QMainWindow::addToolbar/removeToolbar

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2008
    Posts
    71
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default QMainWindow::addToolbar/removeToolbar

    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:

    Qt Code:
    1. ui->pushButton_1->isChecked() ? this->addToolBar(t1) : this->removeToolBar(t1);
    To copy to clipboard, switch view to plain text mode 

    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
    Attached Files Attached Files
    Last edited by psih128; 17th November 2009 at 17:00.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.