Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, October 2007
QToolBar popup menu problem.


Message 1 in thread

Dear Qt community,

I am facing a strange issue with QToolBar. I have a QToolBar and several 
other widgets like
QTableWidgets. When one of the widgets is selected, the toolbar is 
cleared (clear() method)
and filled again with new QActions associated with the selected widget 
(some kind of dynamic
toolbar). It works fine, untill I add so many QActions that the QToolBar 
has to display a small
arrow, which provides a popup menu containing the remaining icons (not 
displayed otherwise).
I happens that when I switch between QWidgets, changing the contents of 
the toolbar, the
icons from both selections are mixes within the popup menu. But when I 
go fullscreen, the
toolbar has enough space to display all the icons, and the display is 
correct. The only way to
clean up the popup menu is to:
1) go fullscreen (so that all the icons are displayed in the toolbar)
2) select another widget (thus, updating the toolbar's content with 
other actions)
3) switching back to the original selection
4) coming back to reduced size
Then, the popup menu contains exactly the required icons.
So it looks like the popup menu is not correctly emptied with the 
clear() method. I could not
find any way to clear it. So I wonder: should the menu be cleared 
separately from the
QToolBar or is it a bug ?

Any piece of advice about this problem would be highly appreciated.

Best regards,

Alex


-- 
 [ signature omitted ] 

Message 2 in thread

This sounds like a bug. You should enter it in the bug tracker on 
trolltech.com.

Bo.

On onsdag den 24. Oktober 2007, Alexandre Beraud wrote:
> Dear Qt community,
>
> I am facing a strange issue with QToolBar. I have a QToolBar and several
> other widgets like
> QTableWidgets. When one of the widgets is selected, the toolbar is
> cleared (clear() method)
> and filled again with new QActions associated with the selected widget
> (some kind of dynamic
> toolbar). It works fine, untill I add so many QActions that the QToolBar
> has to display a small
> arrow, which provides a popup menu containing the remaining icons (not
> displayed otherwise).
> I happens that when I switch between QWidgets, changing the contents of
> the toolbar, the
> icons from both selections are mixes within the popup menu. But when I
> go fullscreen, the
> toolbar has enough space to display all the icons, and the display is
> correct. The only way to
> clean up the popup menu is to:
> 1) go fullscreen (so that all the icons are displayed in the toolbar)
> 2) select another widget (thus, updating the toolbar's content with
> other actions)
> 3) switching back to the original selection
> 4) coming back to reduced size
> Then, the popup menu contains exactly the required icons.
> So it looks like the popup menu is not correctly emptied with the
> clear() method. I could not
> find any way to clear it. So I wonder: should the menu be cleared
> separately from the
> QToolBar or is it a bug ?
>
> Any piece of advice about this problem would be highly appreciated.
>
> Best regards,
>
> Alex



-- 
 [ signature omitted ]