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

Ian Wadham ianw at netspace.net.au
Mon Aug 25 00:21:00 CEST 2003


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.

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.

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.

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.

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.

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.

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 :-(

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.

CU, Ian W.



More information about the kde-games-devel mailing list