Results 1 to 6 of 6

Thread: Toolbar show menu

  1. #1
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Toolbar show menu

    I'm trying to create a toolbar show menu. A menu with checkbox actions to show and hide the toolbars. I'm wondering how to accomplish this, because there doesn't seem to be a signal to warn me when a toolbars visibility changes by other means. (I need to also update the checkbox action.)

    Thanks!
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Toolbar show menu

    You can subclass QToolBar and make it emit such signal or you can install an event filter.

  3. #3
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Toolbar show menu

    You shouldn't be interested if a toolbar was shown or hidden in the mean time, but what is it's state(hidden(), !hidden() ) when you show the menu.

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

  5. The following user says thank you to jpn for this useful post:

    Michiel (26th May 2007)

  6. #5
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Toolbar show menu

    That's exactly the thing I was looking for. Thanks!

    The other tips would also have worked. Thanks!
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Toolbar show menu

    Quote Originally Posted by jpn View Post
    I knew it had to be somewhere and just wonder why I haven't seen this before.

Similar Threads

  1. MainWindow Menu bug in Qt 4.2.3?
    By No-Nonsense in forum Qt Programming
    Replies: 4
    Last Post: 11th March 2007, 11:47
  2. where could QPopupMenu show besides QMenuBar !
    By bigbigmoon in forum Newbie
    Replies: 4
    Last Post: 2nd November 2006, 01:03
  3. Tracking separators in a menu (insertSeparator)
    By PrimeCP in forum Qt Programming
    Replies: 4
    Last Post: 25th January 2006, 18:10

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.