[Paraview] Add Icon to a Custom Applications (PV 3.8.0)

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Thu Jun 3 09:57:56 EDT 2010


What you need to do is create a new resource (qrc) file with your icon
and then refer to the qrc in your ui file. Look at the CMakeLists.txt
in Qt/Core or Qt/Components to see how to compile a qrc file.

Utkarsh

On Tue, Jun 1, 2010 at 11:51 AM, Salman SHAHIDI <salshahidi at gmail.com> wrote:
> Thank you for your response.
>
> Yes I want the icon to show up in the top-left corner of the window. I can
> assign an icon in the Qt designer (by resource file or directly by choosing
> an icon file) but it works only for the icons selected from the following
> folder:
> " /../Qt/Components/Resources/Icons/"
>
> This problem occurs only for qt-based application using paraview.
>
> Thank you for your suggestions,
>
> Salman SHAHIDI
>
>
> 2010/5/31 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
>>
>> Before I can suggest a possible fix, can you elaborate what exactly do
>> you expect the result to be? The APPLICATION_ICON and BUNDLE_ICON are
>> used to define the default icon used by Explorer on Windows and Finder
>> on MAC when showing the application (.exe on Windows and .app on Mac).
>>  If you want the icon to show  up in the top-left corner of the wndow,
>> then you need to set the icon as the windowIcon on your QMainWindow
>> (you can do that in the Qt designer as well).
>>
>> Utkarsh
>>
>>
>> On Sat, May 29, 2010 at 1:39 PM, Salman SHAHIDI <salshahidi at gmail.com>
>> wrote:
>> > Hi All,
>> > I have created Qt-based custom visualization applications using
>> > ParaView's
>> > Parallel Visualization framework (Version 3.8.0). I am trying to figure
>> > out
>> > how to add an icon to this application. I have added these two yellow
>> > lines
>> > in my CMakeLists.txt file in order to assign the WinIcon.ico to my
>> > application:
>> >
>> > -------------------------------------------------------------------------
>> > # Build the client
>> > build_paraview_client(liuppa_viewer
>> >     TITLE "LIUPPA Viewer (ParaView-based Example Application)"
>> >     ORGANIZATION  "LIUPPA Viewer Coorporation"
>> >     VERSION_MAJOR 1
>> >     VERSION_MINOR 0
>> >     VERSION_PATCH 1
>> >     SPLASH_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/LIUPPAsplash.png"
>> > -->    BUNDLE_ICON   "${CMAKE_CURRENT_SOURCE_DIR}/WinIcon.ico"
>> > -->   APPLICATION_ICON  "${CMAKE_CURRENT_SOURCE_DIR}/WinIcon.ico"
>> >     REQUIRED_PLUGINS LIUPPAViewerPlugin
>> >
>> >     GUI_CONFIGURATION_XMLS
>> >       ${CMAKE_CURRENT_SOURCE_DIR}/SupportedReader.xml
>> > )
>> > ------------------------------------------------------------------------
>> >
>> > No error displayed in compiling and build, but it does not work (still
>> > no
>> > icon )
>> > Any advise is much appreciated.
>> >
>> > Salman SHAHIDI
>> >
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Please keep messages on-topic and check the ParaView Wiki at:
>> > http://paraview.org/Wiki/ParaView
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.paraview.org/mailman/listinfo/paraview
>> >
>> >
>
>


More information about the ParaView mailing list