Results 1 to 2 of 2

Thread: unable to hide combobox or spinbox in toolbar

  1. #1
    Join Date
    Feb 2008
    Posts
    51
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default unable to hide combobox or spinbox in toolbar

    Hi,

    i am unable to hide combobox or spinbox in toolbar
    i have added one combox, one spinbox and many actions to my toolbar

    I have added above toolbar to my main window

    There are multiple items in my scene.

    when i selects item in scene i am showing the toolbar associated with that item.

    my above said toolbar is shared by two items but the functionality differs a little.

    so i want to hide few functionalities in toolbar when i selects a particular item.

    i have implemented focusInEvent of item and calling a mathod of toolbar to hide combobox and spinbox.

    in that method i am calling setvisible method of both widgets

    but these are shown whenever i calls show method of my toolbar

    please tell me the reason behind this unexpected behaviour

    if you need more info please let me know i will try to explain it in more details.

    Thanks & Regards,

    Sandip

  2. #2
    Join Date
    Feb 2008
    Posts
    51
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Thumbs up Re: unable to hide combobox or spinbox in toolbar

    Hi,

    I solved the above said problem.
    When I calls addWidget function to add combox or spinbox into toolbar
    it returns me the pointer to QAction.
    I used this pointer and called it's set visible method to show or hide the combo box or spin box.


  3. The following user says thank you to Sandip for this useful post:

    mentalmushroom (20th April 2011)

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.