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

List:       kde-panel-devel
Subject:    Re: Plasma-devel Digest, Vol 9, Issue 100
From:       Diego Casella <polentino911 () gmail ! com>
Date:       2009-03-31 18:49:39
Message-ID: e6aee9e0903311149s48904389ye3cbab52a9d94f34 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@kde.org>

> Send Plasma-devel mailing list submissions to
>        plasma-devel@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@kde.org
>
> You can reach the person managing the list at
>        plasma-devel-owner@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@gmx.at>
> To: plasma-devel@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@gmx.at)
>
>
> Thanx for any feedback
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel@kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
>

[Attachment #5 (text/html)]

Hi Thomas,<br>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.<br>( however, if you have tons of images, how about using \
resources ? )<br> Here it is the explanation <a \
href="http://doc.trolltech.com/4.4/qcoreapplication.html#applicationDirPath">http://doc.trolltech.com/4.4/qcoreapplication.html#applicationDirPath</a><br><br>Cheers \
!<br><br><br><div class="gmail_quote"> 2009/3/31  <span dir="ltr">&lt;<a \
href="mailto:plasma-devel-request@kde.org">plasma-devel-request@kde.org</a>&gt;</span><br><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> Send Plasma-devel mailing list submissions to<br>
        <a href="mailto:plasma-devel@kde.org">plasma-devel@kde.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://mail.kde.org/mailman/listinfo/plasma-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br> or, via \
                email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:plasma-devel-request@kde.org">plasma-devel-request@kde.org</a><br>
 <br>
You can reach the person managing the list at<br>
        <a href="mailto:plasma-devel-owner@kde.org">plasma-devel-owner@kde.org</a><br>
 <br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of Plasma-devel digest...&quot;<br>
<br>Today&#39;s Topics:<br>
<br>
   1. Unable to load images for pushbuttons from relative path<br>
      (Eitzenberger Thomas)<br>
<br><br>---------- Messaggio inoltrato ----------<br>From: Eitzenberger Thomas &lt;<a \
href="mailto:eth@gmx.at">eth@gmx.at</a>&gt;<br>To: <a \
href="mailto:plasma-devel@kde.org">plasma-devel@kde.org</a><br>Date: Tue, 31 Mar 2009 \
                10:10:43 +0200<br>
Subject: Unable to load images for pushbuttons from relative path<br><div \
style="font-family: &#39;Sans Serif&#39;; font-size: 9pt; font-weight: 400; \
font-style: normal;">Hi,<br> <p style="margin: 0px; text-indent: \
0px;"><br></p>someone on #plasma told me i could ask for help via this emailaddr  \
too....<br> <p style="margin: 0px; text-indent: 0px;"><br></p>I need a pushbutton in \
the parley applet to trigger playing the sound file<br> <p style="margin: 0px; \
text-indent: 0px;"><br></p>The button shall show up green if the url is valid and \
orange if not, grey if checking/ongoing<br> <p style="margin: 0px; text-indent: \
0px;"><br></p>Up to now I was only able to get the pushbutton showing up with the \
images using absolute URLS<br> <p style="margin: 0px; text-indent: 0px;"><br></p>I \
tried with &quot;widgets/play_green.png&quot; &quot;widgets/play_green&quot; 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.....<br>

<p style="margin: 0px; text-indent: 0px;"><br></p>Any help would be \
appreciated...<br> <p style="margin: 0px; text-indent: 0px;"><br></p>For discussions \
you can find my also on skype (user EItzenberger Thomas) and on MSN (user <a \
href="mailto:eth@gmx.at" target="_blank">eth@gmx.at</a>)<br> <p style="margin: 0px; \
text-indent: 0px;"><br></p>Thanx for any \
feedback</div><br>_______________________________________________<br> Plasma-devel \
mailing list<br> <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br> \
<br></blockquote></div><br>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


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

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