PDA

View Full Version : unable to hide combobox or spinbox in toolbar



Sandip
21st July 2008, 09:38
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

Sandip
22nd July 2008, 11:52
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.

:D