<div dir="ltr"><br><br><div class="gmail_quote">2010/6/3 Salman SHAHIDI <span dir="ltr"><<a href="mailto:salshahidi@gmail.com">salshahidi@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Hi Utkarsh,<br><br>Thank you very much. That works. My problem was configuration of build_paraview_client( ). Your patch is very clear in order to configure out this one.<br><font color="#888888"><br>Salman</font><div>
<div></div><div class="h5"><br><br><div class="gmail_quote">
2010/6/3 Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>I've extended the example under<br>
ParaView/Examples/CustomApplication/Spreadsheet to demonstrate how to<br>
change the application icon. Attached is a patch with relevant code<br>
that was added for the same.<br>
<br>
----------------------------------------------------<br>
commit 27e71a8d56adc2ec44a93296c68ab2a2d66460a6<br>
Author: Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>><br>
Date: Thu Jun 3 15:53:00 2010 -0400<br>
<br>
Demonstrates how to add a main-window icon.<br>
<br>
Also demonstrates how to add custom resources to a custom application.<br>
----------------------------------------------------<br>
<br>
Utkarsh<br>
<br>
</div><div><div></div><div>On Thu, Jun 3, 2010 at 3:42 PM, Salman SHAHIDI <<a href="mailto:salshahidi@gmail.com" target="_blank">salshahidi@gmail.com</a>> wrote:<br>
> I had created it. But it does not work. I don't know how to configure out my<br>
> CMakeListes.txt to consider my qrc file.<br>
><br>
><br>
> 2010/6/3 Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>><br>
>><br>
>> What you need to do is create a new resource (qrc) file with your icon<br>
>> and then refer to the qrc in your ui file. Look at the CMakeLists.txt<br>
>> in Qt/Core or Qt/Components to see how to compile a qrc file.<br>
>><br>
>> Utkarsh<br>
>><br>
>> On Tue, Jun 1, 2010 at 11:51 AM, Salman SHAHIDI <<a href="mailto:salshahidi@gmail.com" target="_blank">salshahidi@gmail.com</a>><br>
>> wrote:<br>
>> > Thank you for your response.<br>
>> ><br>
>> > Yes I want the icon to show up in the top-left corner of the window. I<br>
>> > can<br>
>> > assign an icon in the Qt designer (by resource file or directly by<br>
>> > choosing<br>
>> > an icon file) but it works only for the icons selected from the<br>
>> > following<br>
>> > folder:<br>
>> > " /../Qt/Components/Resources/Icons/"<br>
>> ><br>
>> > This problem occurs only for qt-based application using paraview.<br>
>> ><br>
>> > Thank you for your suggestions,<br>
>> ><br>
>> > Salman SHAHIDI<br>
>> ><br>
>> ><br>
>> > 2010/5/31 Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>><br>
>> >><br>
>> >> Before I can suggest a possible fix, can you elaborate what exactly do<br>
>> >> you expect the result to be? The APPLICATION_ICON and BUNDLE_ICON are<br>
>> >> used to define the default icon used by Explorer on Windows and Finder<br>
>> >> on MAC when showing the application (.exe on Windows and .app on Mac).<br>
>> >> If you want the icon to show up in the top-left corner of the wndow,<br>
>> >> then you need to set the icon as the windowIcon on your QMainWindow<br>
>> >> (you can do that in the Qt designer as well).<br>
>> >><br>
>> >> Utkarsh<br>
>> >><br>
>> >><br>
>> >> On Sat, May 29, 2010 at 1:39 PM, Salman SHAHIDI <<a href="mailto:salshahidi@gmail.com" target="_blank">salshahidi@gmail.com</a>><br>
>> >> wrote:<br>
>> >> > Hi All,<br>
>> >> > I have created Qt-based custom visualization applications using<br>
>> >> > ParaView's<br>
>> >> > Parallel Visualization framework (Version 3.8.0). I am trying to<br>
>> >> > figure<br>
>> >> > out<br>
>> >> > how to add an icon to this application. I have added these two yellow<br>
>> >> > lines<br>
>> >> > in my CMakeLists.txt file in order to assign the WinIcon.ico to my<br>
>> >> > application:<br>
>> >> ><br>
>> >> ><br>
>> >> > -------------------------------------------------------------------------<br>
>> >> > # Build the client<br>
>> >> > build_paraview_client(liuppa_viewer<br>
>> >> > TITLE "LIUPPA Viewer (ParaView-based Example Application)"<br>
>> >> > ORGANIZATION "LIUPPA Viewer Coorporation"<br>
>> >> > VERSION_MAJOR 1<br>
>> >> > VERSION_MINOR 0<br>
>> >> > VERSION_PATCH 1<br>
>> >> > SPLASH_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/LIUPPAsplash.png"<br>
>> >> > --> BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/WinIcon.ico"<br>
>> >> > --> APPLICATION_ICON "${CMAKE_CURRENT_SOURCE_DIR}/WinIcon.ico"<br>
>> >> > REQUIRED_PLUGINS LIUPPAViewerPlugin<br>
>> >> ><br>
>> >> > GUI_CONFIGURATION_XMLS<br>
>> >> > ${CMAKE_CURRENT_SOURCE_DIR}/SupportedReader.xml<br>
>> >> > )<br>
>> >> ><br>
>> >> > ------------------------------------------------------------------------<br>
>> >> ><br>
>> >> > No error displayed in compiling and build, but it does not work<br>
>> >> > (still<br>
>> >> > no<br>
>> >> > icon )<br>
>> >> > Any advise is much appreciated.<br>
>> >> ><br>
>> >> > Salman SHAHIDI<br>
>> >> ><br>
>> >> ><br>
>> >> > _______________________________________________<br>
>> >> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> >> ><br>
>> >> > Visit other Kitware open-source projects at<br>
>> >> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> >> ><br>
>> >> > Please keep messages on-topic and check the ParaView Wiki at:<br>
>> >> > <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
>> >> ><br>
>> >> > Follow this link to subscribe/unsubscribe:<br>
>> >> > <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
>> >> ><br>
>> >> ><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>