New to list, make in applet (icon problem SOLVED)
Aaron J. Seigo
aseigo at kde.org
Mon Dec 8 22:46:37 CET 2008
On Monday 08 December 2008, David Baron wrote:
> On Monday 08 December 2008 21:33:21 David Baron wrote:
> > On Monday 08 December 2008 19:04:17 Aaron J. Seigo wrote:
> > > > > > Big outstanding issue is getting icons into the UI.
> > > > >
> > > > > use KIcon.
> > > >
> > > > Get the same crashes. KIcon will give me more flexibility and less
> > > > restrictions tied to resource folders, but it has to work first :-)
> > >
> > > what are the crashes? you need to give us backtraces and example code
> > > otherwise it's really hard to know what's going on ...
> >
> > The code is a simple pushButtonX->setIcon( KIcon( "nice-oxygen-icon");
> >
> > No useable backtraces. The example I posted was not from this crash.
>
> and of course, one better make sure that the set_ui (generated by the qt
> designer) is called BEFORE trying to use any of those widgets, huh :-)
hehe. yes, that's usually a good idea ;)
> So I can use icons by name rather than by file-path/resource-path.
> How might I do the same thing with the applet::svg images?
you can install the svg using something like this in your CMakeLists.txt file:
install( FILES <list of svgs> DESTINATION
${DATA_INSTALL_DIR}/desktoptheme/default/<pluginname> )
and then you refer to them as "<pluginname>/<svgname>", leaving off the .svg or
.svgz extension.
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Qt Software
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20081208/092023b7/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20081208/092023b7/attachment.sig
More information about the Plasma-devel
mailing list