[Paraview] Custom Panel will NOT load image as Icon.
Michael Jackson
mike.jackson at bluequartz.net
Fri Feb 5 09:20:13 EST 2010
Thanks for the sanity check. I guess something was not getting rebuilt
as I cleaned the project and rebuilt and now the image is properly
loaded. Odd.
Thanks again for taking the time.
___________________________________________________________
Mike Jackson www.bluequartz.net
On Feb 5, 2010, at 4:15 AM, Paul Edwards wrote:
>
> 1) You need to check you are adding the resources:
>
> QT4_ADD_RESOURCES(RCS_SRCS MyResource.qrc)
>
> Check this by looking at the generated file in the build directory
> (qrc_MyResource.cxx).
>
> 2) Make sure you are including it in the plugin:
>
> ADD_PARAVIEW_PLUGIN(MyPlugin ....
> ....
> SOURCES ... ${RCS_SRCS} ...)
>
> Check this with make VERBOSE=1 to make sure it is being linked in
>
> 3) And, if both of the above are correct make sure that you refer to
> your resource correctly.
>
> e.g. for foo.jpg in ResourceFile.qrc:
>
> <RCC>
> <qresource prefix="/MyResource">
> <file>foo.jpg</file>
> </qresource>
> </RCC>
>
> Use:
> :/MyResource/foo.jpg
>
>
> Hope that helps!
>
> Regards,
> Paul
>
> 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:- http://doc.qt.nokia.com/4.6/resources.html
>
> Make sure you are linking this file into your executable
> On 4 February 2010 21:40, Michael Jackson
> <mike.jackson at bluequartz.net> wrote:
> Yep.
> --
> mike
>
>
> On Feb 4, 2010, at 4:38 PM, Paul Edwards wrote:
>
> Are you adding the resource file in your CMakeLists.txt?
>
> Regards,
> Paul
>
>
> On Feb 4, 2010 9:31 PM, "Michael Jackson"
> <mike.jackson at bluequartz.net> wrote:
>
> 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.
>
> Anyone have any ideas?
> ___________________________________________________________
> Mike Jackson www.bluequartz.net
> Principal Software Engineer mike.jackson at bluequartz.net
> BlueQuartz Software Dayton, Ohio
>
>
More information about the ParaView
mailing list