[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: How to make the statusbar only show items which fit into the
From:       "Friedrich W. H. Kossebau" <kossebau () kde ! org>
Date:       2009-06-12 17:49:40
Message-ID: 200906121949.41096.kossebau () kde ! org
[Download RAW message or body]

Vendredi, le 12 juin 2009, à 19:11, Thomas Lübking a écrit:
> Hi.
>
> You could possibly:
> - change the sizepolicy of the contained widgets or

But there is not QSizePolicy::MinimumOrHide option, which is what I would 
need, or? Example would be a toggle button for Readonly, it should be shown 
complete or not.

> - add an eventFilter that monitors resize events and when "close" to the
> minimum size (width()) hides the last item, resp. show it when slight above
> minimum size + first hidden widget size or
>
> -b) changes the last item text (iff) to an elided variant or
>
> - derive a statusbar instead of using an eventfilter
>
> is that what you meant?

Kind of. The last option is what I had been going to try, but my sketch got 
stuck at things like the resize being already done based on the old layout, 
before resizeEvent() is called. And the '"close" to' is difficult to be 
defined, especially as I would not like to waste a pixel. So I am not sure 
how much of a hack this is going to be.

I still wonder that I am the first one with this need. And usually I am not 
and there is already a Qt solution. Something like a smart layout class which 
does the calculation and manages the included widgets accordingly. I mean the 
toolbar can do this, too.

Thanks
Friedrich
-- 
Okteta - KDE 4 Hex Editor - http://utils.kde.org/projects/okteta
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic