Plasma-devel Digest, Vol 9, Issue 100
Diego Casella
polentino911 at gmail.com
Tue Mar 31 20:49:39 CEST 2009
Hi Thomas,
the solution is quite simple; you have to use use the applicationDirPath()
method to retrieve the app location; then combine it to get the full path
for your imgs.
( however, if you have tons of images, how about using resources ? )
Here it is the explanation
http://doc.trolltech.com/4.4/qcoreapplication.html#applicationDirPath
Cheers !
2009/3/31 <plasma-devel-request at kde.org>
> Send Plasma-devel mailing list submissions to
> plasma-devel at kde.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://mail.kde.org/mailman/listinfo/plasma-devel
> or, via email, send a message with subject or body 'help' to
> plasma-devel-request at kde.org
>
> You can reach the person managing the list at
> plasma-devel-owner at kde.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Plasma-devel digest..."
>
> Today's Topics:
>
> 1. Unable to load images for pushbuttons from relative path
> (Eitzenberger Thomas)
>
>
> ---------- Messaggio inoltrato ----------
> From: Eitzenberger Thomas <eth at gmx.at>
> To: plasma-devel at kde.org
> Date: Tue, 31 Mar 2009 10:10:43 +0200
> Subject: Unable to load images for pushbuttons from relative path
> Hi,
>
>
> someone on #plasma told me i could ask for help via this emailaddr too....
>
>
> I need a pushbutton in the parley applet to trigger playing the sound file
>
>
> The button shall show up green if the url is valid and orange if not, grey
> if checking/ongoing
>
>
> Up to now I was only able to get the pushbutton showing up with the images
> using absolute URLS
>
>
> I tried with "widgets/play_green.png" "widgets/play_green" and also tried
> to embedd teh images in to the svg file but there I am stranded as the
> PushButton doesnt want a QPixmap but a path QString.....
>
>
> Any help would be appreciated...
>
>
> For discussions you can find my also on skype (user EItzenberger Thomas)
> and on MSN (user eth at gmx.at)
>
>
> Thanx for any feedback
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20090331/e164316d/attachment.htm
More information about the Plasma-devel
mailing list