<br>1) You need to check you are adding the resources:<br><br> QT4_ADD_RESOURCES(RCS_SRCS MyResource.qrc)<br><br>Check this by looking at the generated file in the build directory (qrc_MyResource.cxx).<br><br>2) Make sure you are including it in the plugin:<br>
<br> ADD_PARAVIEW_PLUGIN(MyPlugin ....<br> ....<br> SOURCES ... ${RCS_SRCS} ...)<br><br>Check this with make VERBOSE=1 to make sure it is being linked in<br><br>3) And, if both of the above are correct make sure that you refer to your resource correctly.<br>
<br>e.g. for foo.jpg in ResourceFile.qrc:<br><br><RCC><br> <qresource prefix="/MyResource"><br> <file>foo.jpg</file><br> </qresource><br></RCC><br><br>Use:<br> :/MyResource/foo.jpg<br>
<br><br>Hope that helps!<br><br>Regards,<br>Paul<br><br>PS there is something qt documentation that mentions how you may need to call Q_INIT_RESOURCE if the resource is in a static library:- <a href="http://doc.qt.nokia.com/4.6/resources.html">http://doc.qt.nokia.com/4.6/resources.html</a> <br>
<br>Make sure you are linking this file into your executable<br><div class="gmail_quote">On 4 February 2010 21:40, Michael Jackson <span dir="ltr"><<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Yep.<br><font color="#888888">
--<br>
mike</font><div><div></div><div class="h5"><br>
<br>
On Feb 4, 2010, at 4:38 PM, Paul Edwards wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Are you adding the resource file in your CMakeLists.txt?<br>
<br>
Regards,<br>
Paul<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Feb 4, 2010 9:31 PM, "Michael Jackson" <<a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a>> wrote:<br>
<br>
I am developing a custom panel for a vtkFilter that I wrote. As part of the GUI, I need to load up a jpg image to use as an icon in the GUI. I put an entry into the .qrc file where the entry for the .ui file is located but when I load the panel the image does not show up. I don't get any type of error either so I am not really sure where to start hunting this down.<br>
<br>
Anyone have any ideas?<br>
___________________________________________________________<br>
Mike Jackson <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
Principal Software Engineer <a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software Dayton, Ohio<br>
</blockquote></blockquote>
<br>
</div></div></blockquote></div><br>