Toolbars are behaving strangely

David Faure faure at
Thu Feb 7 19:17:00 GMT 2008

On Thursday 07 February 2008, Rafael Fernández López wrote:
> Hi all,
> I plan to commit the attached patch on Monday 11 if no objections presented 
> till that day.
> Fixes 2 problems:
> 1) Open Konqueror. Right button on main toolbar. Text Alignment. Text under 
> icons. Reopen Konqueror. That setting is lost.
> This is a bug due to KToolbar when xmlgui provides a buttonstyle 
> (konq-webbrowsing.rc). At some point the defaults that xmlgui provides are 
> overriden with the global settings, and the settings that were going to be 
> saved for that toolbar are restored, meaning that when you restart konqueror 
> what is actually set is the xmlgui default preference: only icons.

This one is OK, as discussed on IRC. Thanks to you and András for your time on
making me remember how that code is supposed to work again :)

> 2) Open a KDE app with toolbars with the "Text under icons" chosen. When you 
> select the "Only icons" your buttons are bigger than they should. Just 
> playing around as for instance starting the app with "Only icons" and then 
> setting "Only text" will end up on unreadable strings because of a lack of 
> space. Those problems are fixed when you force the toolbar to be updated => 
> dragging the toolbar or similar actions.

Why not just move the updateGeometry() call into setToolButtonStyle()?
Ah because it's a QToolBar method? Then I think this is a QToolBar but and it should
call updateGeometry() itself. Right way to find out would be to test on a qt-only application.
Sorry, I don't like workarounds :)

David Faure, faure at, sponsored by Trolltech to work on KDE,
Konqueror (, and KOffice (

More information about the kde-core-devel mailing list