[Kde-games-devel] K or Qt includes ?

Rob Kaper cap at capsi.com
Sun Aug 24 18:43:50 CEST 2003


On Sun, Aug 24, 2003 at 11:21:00PM +1000, Ian Wadham wrote:
> cantabile wrote:
> > ... is there any reason why I should use K libraries
> > instead of QT ? For example KToolbar or QToolBar ? Why ?
> > 
> Rob Kaper wrote:
> > Because KToolbar offers more functionality than QToolbar,
> > or offers solutions with a complete desktop environment in
> > mind (versus single applications).
> 
> Well, I echo your questions, cantabile, but for different
> reasons ... and I beg to differ, Rob.  I'm using KToolbar,
> because that is what KDE applications require, but I
> previously found QToolbar easier to program and
> better documented and have used each of them on the same
> program at different times.  I have also found the following
> problems or features(?) in KToolbar, as opposed to QToolbar.

ISorry, I answered incorrectly: should've kept it generic: K usually offers
more than Q. If KToolbar is broken, perhaps that needs fixing.

> 1. The pixmaps on my buttons cannot be displayed larger at
>     higher screen resolution.  They are 16x16 pixmaps, but when
>     QWorldMatrix scales them up, they still appear small, even
>     though usesBigPixmaps() is true.  They are fine in QToolbar.

I believe KDE applications are required to carry at least 16x16, 22x22 and
32x32 icons, and 48x48 and 64x64 are recommended. If you need help creating
decent icons at these resolutions, please contact kde-artists at kde.org

> 2. QToolbar spaces out buttons when you use the "stretchable"
>     property, making them easier to see.  In KToolbar, they are all
>     scrunched together up at one end, with very little space between.
>     To work around this, I inserted separators everywhere, but that
>     does not seem to be a good solution.

Hm, to be honest I do think these problems can better be discussed on
kde-core-devel, which is the mailinglist for the KDE core libraries. At
least I lack the detailed knowledge on [K|Q]Toolbar to answer this one.

> 3. KToolbar sometimes does not display the button
>     pixmaps correctly.  For example, if a button pixmap is all
>     sky blue (representing background to be painted by my game
>     editor), no button appears, just an empty grey space.  In other
>     buttons, only part of the picture is displayed and the sky blue
>     part is grey, like the toolbar background.  Also some of the
>     other pixmaps get bits of KToolbar background bleeding in.
>     QToolbar draws what you give it, at the size you give it.

Are you using the KIconLoader class and related stuff? (BarIcon, etc)

> 4. In KDE applications generally, toolbar buttons are miniscule
>     at 1280x1024 resolution, even on a 17" monitor.  They look
>     very pretty,  nice colours etc., but I find it hard to see what the
>     pictures are and even harder to figure out what the buttons do.
>     Gideon (KDevelop 3) is an example of this.

You can configure the preferred icon size from kcontrol as well as
individually per toolbar (rmb+configure).

> 5. Many applications, including mine, don't implement "What's
>     This?", but how do you remove it from the KDE Help menu?
>     It's rather unfriendly to the user to leave it on the menu but
>     not implemented, particularly when he has problem 4.

You can disable it with GUI merging (XML GUI). Noticed I don't even disable
it myself, would have to dig into that, but it's definitely possible.

> I'm unimpressed with KToolbar.  But maybe I have missed
> something?  If I cannot find a solution to problem 3, I will
> have to go back to QToolbar (hoping KMainWindow will
> support it).  My icons look really bad in KToolbar :-(

Oh, are you using PNGs? (I'd assume so?)

> BTW, maybe cantabile could use the standard "game_pause"
> action for his "stop_anim".  It comes with "P" as a shortcut
> and is on the standard "Game" menu, with a neat little icon
> like a CD player's pause-button.

That might work.. standard actions are of course the prefered way of doing
things. :)

Rob
-- 
Rob Kaper     | "They that can give up essential liberty to obtain a little
cap at capsi.com | temporary safety deserve neither liberty nor safety."
www.capsi.com | - Benjamin Franklin, Historical Review of Pennsylvania, 1759
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20030824/39d65fc1/attachment.bin


More information about the kde-games-devel mailing list