Advice about deploying with extra files
-
can you give us the stylesheet code you used or what you used in Qt Creator?
-
in Qt Creator, right clicked on project, add new, Qt Resource file, chose name, added to project. Then chose prefix and added file. Save.
Open the form - selected main window, on right menu, property -> style sheet.
In the edit style sheet, add resource, and then background-image: url(:/new/prefix1/IMAGE.jpg);
Now the form has the wonderful IMAGE as the background, until I hit build... then it doesnt.Thanks Eddy.
-
that's strange.
if i do the same i see the image in both my preview as when i build it.what version do you have of Qt and Qt Creator?
menu help < about Qt Creator. There you will see both versions. -
Qt Creator 2.0.1
Based on Qt 4.7.0 (32 bit) -
i'm on Qt Creator 2.2 Based on Qt 4.7.4 (64 bit)
you could search bug tracker to see if there is ann issue. obviously it's resolved in my later version.
"use this link :http://developer.qt.nokia.com/contribute
. -
I've tried it on a new file and it works. It seems I have a ui header file that is over-riding any work i do on the form. Is there a way to create a new header file for the form? or a way to delete the header file?
-
If you delete the ui header file in windows explorer and build again?
-
I get the error message:
No rule to make target '.. ui_MYPROJECT.h', needed by 'debug/MYPROJECT.o'. Stop
-
Delete your build directory or use Qt Creator > clean.
Run qmake again and build.
-
I did Build-> Clean All, then Run qmake, then Build All.... the header file is unfortunately the same. Grr
-
There must be something else going on. Can you use your ui file in a newly created project and see what happens then?
-
Unfortunately nothing, it seems the header file is overwriting any changes I make to the ui form. for example if I edit the ui header file and change the window title... then it changes. I've tried copying to a new file but I get a hundred odd error messages saying:
"invalid use of incomplete type 'struct Ui::MYPROJECT'"
or
forward declaration of 'struct Ui::MYPROJECT'am just about getting ready to throw my computer out of the window
-
Normally you do nothing in the ui header file. Qt generates it for you.
Did you alter things there before?
If you clean your project it shouldn't be there anymore.
Did you delete it in windows explorer? Make sure it's deleted before running qmake and building again