[Solved] Problem with Qt Resource System
-
Thanks for feedback.
I had used 16x16. In the meantime I have tested 32x32 and 48x48. Each of these formats are shown on my local machine (development), but not on the server where I am running the application.
When running on my local machine it is always ok, regardless if through Qt creator or on a deployment folder. The deployment folder is copied with all the dependencies to the server. So, it has the same dlls including the ones required for MinGW. Only a couple of windows dlls as supplied by the system shall be different. -
Do you also have the rc (not qrc) file for your application ?
-
Well, at least we know that something is working if the icon disappeared...
Can you post the rc and pro file ?
-
bliblablo.pro
@
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgetsTEMPLATE = app
TARGET = bliblabloinclude(../../CompileSettings/blabla.inc)
INCLUDEPATH += .
./Guiinclude(bliblablo.pri)
win32:RC_FILE = bliblablo.rc
HEADERS +=
Gui/blobloProcessInformation.hSOURCES +=
Gui/blobloProcessInformation.cpp
@bliblablo.rc
@
IDI_ICON1 ICON DISCARDABLE "bliblablo.ico"
@bliblablo.qrc
@
<RCC>
<qresource prefix="/bliblablo">
<file>pictograms-road_signs-stop_sign(16x16).ico</file>
<file>pictograms-road_signs-stop_sign(32x32).ico</file>
<file>pictograms-road_signs-stop_sign(48x48).ico</file>
</qresource>
</RCC>
@The pixel sizes are given in the names. These icons are from open_icon_library. bliblablo.ico is self-generated icon. Do not remember any more how.
Note: I have anonymized the names, but they are consistent.
-
Just to rule out the obvious, is bliblablo.ico in the same folder as the rc file ?
-
Yes. All icons are in the same folder as well as the (q)rc files.
The problem is not bliblablo,ico which is shown in left corner of mainwindow and everywhere where it should appear. The problems are with the stop sign. They are loaded out of the qrc file with
@
QIcon icon ( ":/bliblablo/pictograms-road_signs-stop_sign(48x48).ico" );
QTableWidgetItem *wgt = new QTableWidgetItem (icon, runName );
ui->twProcessOverview->setItem ( cnt, _ActionCol, wgt );
@No problem on development machine started inside and outside of creator with and without debug mode.
When bringing to other machine, the application does work as expected. Only the stupid stop icons are not shown. -
Woops sorry… I misunderstood you.
Is your ico plugin missing ?
-
You're welcome !
That's why I use png for images other than the required application icon, no plugin needed :)