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

List:       kde-core-devel
Subject:    Re: QPushButton problem with KDE styles
From:       Matthias Ettrich <ettrich () trolltech ! com>
Date:       2001-03-20 20:32:29
[Download RAW message or body]

On Tuesday 20 March 2001 17:34, Martijn Klingens wrote:
> I was trying to create a QPushButton with a QIconSet and a caption and I
> encountered a weird problem. Most KDE styles don't seem to support the icon
> set. They just leave it end, so I end up with a pixmap-less button.
>
> I really like buttons with both icons and text, as they are often more
> clear. Somehow the human eye seems to recognize icons faster than text, at
> least for me, that is.
>
> It's not a bug in my application, a plain Qt app works well. After some
> testing I found that _ALL_ Qt's styles support this feature, but only _ONE_
> KDE style supports it.
>
> The following styles support a QIconSet in a QPushButton:
> - default
> - qtcde
> - qtmotifplus
> - qtsgi
> - ksgistyle
> - qtmotif
> - qtplatinum
> - qtwindows
>
> Quite a lot, but none of them are used very often. The ones that are, don't
> support it:
> - b3
> - highcolor
> - kstep
> - system
> - marble
> - systemalt
> None of these shows the icons.
>
> Is there a reason for this? If not, is it possible to change the styles to
> support icon sets? If someone tells me how to do so, I'm willing to do this
> myself. I haven't looked at the code yet though as I'm somehow afraid
> there's a special reason for this particular (mis)behaviour.

There's no reason for that misbehaviour other than that the iconset support 
for QPushButton probably was added after the KDE styles have been written. 

Thanks for bringing that up. The solution is simple: change the 
drawPushButton button functions in the KDE styles according to what the Qt 
styles do (have a look at qwindowsstyle.cpp, for example).


Matthias

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

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