[Kde-games-devel] Re: KToolBar ?

Aaron J. Seigo aseigo at olympusproject.org
Thu Aug 21 15:58:42 CEST 2003


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

On Thursday 21 August 2003 02:37, cantabile wrote:
> (void)new KAction(i18n("&Stop"), QIconSet(QPixmap("/pics/stop.png")),0,
> this, SLOT(slotstop()),actionCollection(), "stop_anim");
>
> How do I make this appear in a toolbar ? So far, every toolbar I can see
> is empty...

you either plug it in manually:

	KAction* action = new KAction(i18n("&Stop"), QIconSet(QPixmap("/pics/stop.
png")),0,  this, SLOT(slotstop()),actionCollection(), "stop_anim");
	action->plug(toolbar());

or you define a toolbar in your ui.rc file and put the action by name there:

 <ToolBar name="mainToolBar" fullWidth="true" >
  <Separator/>
  <Action name="stop_anim"/>
 </ToolBar>

- -- 
Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/RTKC1rcusafx20MRAlBdAJ9vHJhPC6827MHXmKdYQQmzatUk/ACfVOuK
4xZeT/QJnvw7K9A83sM/liA=
=IZW8
-----END PGP SIGNATURE-----


More information about the kde-games-devel mailing list