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

List:       kde-games-devel
Subject:    [Kde-games-devel] Re: KToolBar ?
From:       Neil Stevens <neil () qualityassistant ! com>
Date:       2003-08-21 0:34:32
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday August 20, 2003 05:22, cantabile wrote:
> Hi,
> I looked at the examples I found over the net, but I don't really
> understand how I can create a KToolBar.
> When I write (from my main widget inherited from KMainWindow):
>
> KToolBar* bar = new KToolBar(this);
> bar->insertButton( ... );
> //I tried adding addDockWindow(bar); with no effect
> bar->show();
>
> nothing appears. Is there something else to do ?

Here's the answer to both questions at once:  By using kdelibs fully, your 
app is easier to write, and your app will look and act more like a KDE 
application.

To create menubars and toolbars you should use the XML GUI system. There is 
a tutorial for it at 
http://developer.kde.org/documentation/tutorials/xmlui/preface.html

Doing it this way means a lot less work for you, because you don't have to 
manage the menubars and toolbars yourself.

Notice that in addition to the KStandardActions in kdelibs, there are 
game-specific ones in libkdegames' kstdgameaction.h

Examples of games using XML GUI are Megami and Atlantik.

- -- 
Neil Stevens - neil@qualityassistant.com

"I'll believe it when I see it." -- George Walker Bush
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE/RBOYf7mnligQOmERAs1hAJ4x+IWirddEC+mDw1EmFIOdw1p3dgCfR2MV
/ofAO/6roC/T6yK8IuypH9s=
=jjrT
-----END PGP SIGNATURE-----

_______________________________________________
kde-games-devel mailing list
kde-games-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-games-devel

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

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