Pritpal Bedi escreveu:

+1) Not showstopper, but definitely something to solve: Icon
     handling made interoperable thorough our GTs. Current
     HB_GTI_ICONRES isn't portable (not supported in GTQTC,
     for good reason), HB_GTI_ICONFILE isn't good because one
     must save that icon as a file before usage, which isn't ideal.

Possibly there is a way to achieve so. Looking for tips.


Icons can be stored in a resource file (.qrc):

Example: qapplication.qrc

<!DOCTYPE RCC><RCC version="1.0">
 <qresource>
     <file>images/copy.png</file>
     <file>images/cut.png</file>
     <file>images/new.png</file>
     <file>images/open.png</file>
     <file>images/paste.png</file>
     <file>images/save.png</file>
 </qresource>
 </RCC>

To use the images in resource file:

QIcon(":/images/new.png")

To compile a qrc file:

c:\Qt\2009.02\qt\bin\rcc.exe -name application application.qrc -o qrc_application.cpp

.qrc is equivalent to .rc and qrc_*.cpp (can be another name) is equivalent to .res.


Regards,
Marcos Gambeta

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to