Hi
QT comes standard in Linux. In MacOs we have xcode, the same thing, right? but what about Windows? It won´t ask for QT libraries when executing the program????
Many thanks!
Hi
QT comes standard in Linux. In MacOs we have xcode, the same thing, right? but what about Windows? It won´t ask for QT libraries when executing the program????
Many thanks!
Well I´ve build the app and execute the exe file in a Windows pc from a USB drive (the app has to be exectuted from the USB) where QT is not installed, and an error about the mingw10.dll appears and the program execution fails. So I wonder If I need to add any library to the files?
It ask first for the mingwm10.dll file. I´ve copied it to my usb folder where the exe file. Then asks for the libgcc_s_dw2-1.dll file. Copied. And finally asks for the Qt4Core.dll file, and this file doesn´t exist in the computer where I have QT installed. ¿?
I think you'll find QtCore4.dll in the bin directory of your Qt install. You're not likely to find Qt4Core.dll anywhere.
Hi,
I´ve copied QtCore4.dll and QtGui4.dll and the program executes ok now. They were in the bin folder, thanks.
But the images (defined as a QGraphicsView) don´t appear.
Why is this?
Thanks
The path of the resource is ok.
For instance I have the file1.ui and the image has a brackground using this code.
It works in the PC where the QT is installed but not in another one from the USB drive.<property name="styleSheet">
<string notr="true">QFrame { background-image: url(:/images/driver.jpg) }</string>
</property>
The images don't appear because you haven't got the path defined correctly. Are the images in a resource file or individual files? How are you referring to them (give an example path string)?
The images are in a resource file "Resources".
Inside it I have my file.qrc.
It has the Prefix: /
And contains the image "images/driver.jpg" with is inside the images folder of the project.
The image is shown perfectly if I execute it in the PC where QT is installed. It doesn´t if is executed from the USB in another computer without QT.
So how is possible the path could be wrong if I can see the image in the first scenario?
thanks
This is likely because you're not referencing the files in the resource file, but rather off your PC disk.The image is shown perfectly if I execute it in the PC where QT is installed. It doesn´t if is executed from the USB in another computer without QT.
Maybe it would help if you answered my second question.
I hope you mean this: For example I refer to the icon like this from a .cpp file
trayIcon->setIcon(QIcon(":/images/favicon.ico"));
To a background image like this from a .h file.
graphicsView->setStyleSheet(QString::fromUtf8("QFrame { background-image: url(:/images/driver.jpg) }"));
Or like this from the .ui file
<string notr="true">QFrame { background-image: url(:/images/driver.jpg) }</string>
In the directory tree of my project I have
-Other files
--images
---favicon.ico
---driver.jpg
-Resources
--file.qrc (this file contains images/driver.jpg, images/favicon.ico)
And in the .pro file I have:
OTHER_FILES += \
images/driver.jpg \
images/favicon.ico
RESOURCES += \
file.qrc
I hope it is clear now
Thanks!
Last edited by nidcker; 2011-04-28 at 09:09. Reason: adding information
That should in theory work. There are many ways to screw up the resource file, but one would expect the problem to be obvious in the simulator.
You might check carefully the hardware build log and be sure that there are no errors or strange messages -- it's possible, eg, that your build is picking up a downlevel resource file.