PDA

View Full Version : Release icons not showing



deepal_de
11th July 2011, 09:14
I have a Qt application... i build it using visual studio 2008...
When i get a release build, the applications runs fine,but icons do not appear.
I need to run the application on PC that do not have QT installed..
Witch files should i include inside my application*folder?? (to get the icons)

Thanks :)

mcosta
11th July 2011, 10:18
What do you menas with "but icons do not appear."?

The application icon or all icons in you program??

deepal_de
11th July 2011, 10:29
icons in my application do not appear on release mode... on debug mode icons appear..
i have icons in .qrc file..
any idea why??

mcosta
11th July 2011, 11:09
Have you rebuild when switched in Release mode?

can you post your .pro file??

deepal_de
11th July 2011, 11:22
Have you rebuild when switched in Release mode?

Yes,
and I got the files to a new folder.. with qtcore.dll and other .ddl's files that require to run the application.


.pro file


TEMPLATE = app
TARGET = MyApplication
DESTDIR = ./Release
QT += core gui network qtmain
CONFIG += debug
DEFINES += QT_LARGEFILE_SUPPORT QT_NETWORK_LIB
PRECOMPILED_HEADER = StdAfx.h
RESOURCES = MyApplication.qrc
DEPENDPATH += .
MOC_DIR += ./GeneratedFiles/release
OBJECTS_DIR += release
UI_DIR += ./GeneratedFiles
RCC_DIR += .
include(MyApplication.pri)
win32:RC_FILE = MyApplication.rc

mcosta
11th July 2011, 11:39
Some questions:


Why "CONFIG += debug" ?
Why "QT += qtmain" ?
What is the contents of CONFIG += debug?

deepal_de
11th July 2011, 12:17
Why "CONFIG += debug" ?
What is the contents of CONFIG += debug?


my mistake.. i copied the .pro file while the configuration is in debug mode
this changes to CONFIG += release and CONFIG += release when i change the project properties to Release mode...



Why "QT += qtmain" ?

thats a default configuration that comes with the .pro file

deepal_de
13th July 2011, 06:36
found the answer for this problem :)
copy the "QT\4.7.3\plugins" folder to your application directory
then



QString sLibPath = QDir::currentPath() + "\\plugins\\";
QApplication::addLibraryPath(sLibPath);