[gelöst] Setting the Application Icon
Verfasst: 27. September 2005 14:29
Hallo beisammen,
ich bin gerade dabiei mich mit qt4 unter windows (mingw) einzuarbeiten, und habe mir gerade folgenden abschnitt der doku angeschaut.
<<Tut
Store the ICO file in your application's source code directory, for example, with the name myappico.ico. Then, create a text file called, say, myapp.rc in which you put a single line of text:
IDI_ICON1 ICON DISCARDABLE "myappico.ico"
Finally, assuming you are using qmake to generate your makefiles, add this line to your myapp.pro file:
RC_FILE = myapp.rc
Tut>>
Nur leider funzt das bei mir nicht und ich komme gerade auch nicht drauf was ich falsch mache.
Das project file sieht so aus.
und das rc file
, leider gehts aber nicht ich bekomme folgende fehlermeldung.
Hat jemand nen idee was ich falsch mache ?
Danke Linse
ich bin gerade dabiei mich mit qt4 unter windows (mingw) einzuarbeiten, und habe mir gerade folgenden abschnitt der doku angeschaut.
<<Tut
Store the ICO file in your application's source code directory, for example, with the name myappico.ico. Then, create a text file called, say, myapp.rc in which you put a single line of text:
IDI_ICON1 ICON DISCARDABLE "myappico.ico"
Finally, assuming you are using qmake to generate your makefiles, add this line to your myapp.pro file:
RC_FILE = myapp.rc
Tut>>
Nur leider funzt das bei mir nicht und ich komme gerade auch nicht drauf was ich falsch mache.
Das project file sieht so aus.
Code: Alles auswählen
######################################################################
CONFIG += designer
TEMPLATE = app
HEADERS += hellodesigner.h
FORMS += helloDesigner.ui
SOURCES += main.cpp \
hellodesigner.cpp
RESOURCES = hellodesigner.qrc
sources.files = $$SOURCES $$HEADERS $$RESOURCES *.ui *.pro
target.path = E:/helloWorld/helloDesigner/
sources.path = E:/helloWorld/helloDesigner/
INSTALLS += target sources
RC_FILE = hellodesigner.rc
Code: Alles auswählen
IDI_ICON1 ICON DISCARDABLE "hellodesigner.ico"
Code: Alles auswählen
E:\helloWorld\helloDesigner>make -f Makefile.Release
Makefile.Release:139: warning: overriding commands for target `release\hellodesi
gner.o'
Makefile.Release:83: warning: ignoring old commands for target `release\hellodes
igner.o'
g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_D
LL -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_THREAD_SUPPORT -DQ
T_NEEDS_QMAIN -I"E:/Qt/4.0.1/include/QtXml" -I"E:/Qt/4.0.1/include/QtGui" -I"E:/
Qt/4.0.1/include/QtCore" -I"E:/Qt/4.0.1/include" -I"E:/Qt/4.0.1/include/QtDesign
er" -I"E:/Qt/4.0.1/include/ActiveQt" -I"release" -I"." -I"E:/Qt/4.0.1/mkspecs/wi
n32-g++" -o release\hellodesigner.o hellodesigner.cpp
g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_D
LL -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_THREAD_SUPPORT -DQ
T_NEEDS_QMAIN -I"E:/Qt/4.0.1/include/QtXml" -I"E:/Qt/4.0.1/include/QtGui" -I"E:/
Qt/4.0.1/include/QtCore" -I"E:/Qt/4.0.1/include" -I"E:/Qt/4.0.1/include/QtDesign
er" -I"E:/Qt/4.0.1/include/ActiveQt" -I"release" -I"." -I"E:/Qt/4.0.1/mkspecs/wi
n32-g++" -o release\qrc_hellodesigner.o qrc_hellodesigner.cpp
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runt
ime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows -o "release\helloDesigner.
exe" release\main.o release\hellodesigner.o release\moc_hellodesigner.o release\
qrc_hellodesigner.o -L"E:\Qt\4.0.1\lib" -lmingw32 -lqtmain release\hellodesigne
r.o -lQtDesigner4 -lQtCore4 -lQtGui4 -lQtXml4 -lqt-mt
release\hellodesigner.o(.text+0x0):hellodesigner.cpp: multiple definition of `He
lloDesigner::writeSettings()'
release\hellodesigner.o(.text+0x0):hellodesigner.cpp: first defined here
release\hellodesigner.o(.text+0x1080):hellodesigner.cpp: multiple definition of
`HelloDesigner::closeEvent(QCloseEvent*)'
release\hellodesigner.o(.text+0x1080):hellodesigner.cpp: first defined here
release\hellodesigner.o(.text+0x10a0):hellodesigner.cpp: multiple definition of
`HelloDesigner::HelloDesigner(QWidget*)'
release\hellodesigner.o(.text+0x10a0):hellodesigner.cpp: first defined here
release\hellodesigner.o(.text+0x1a00):hellodesigner.cpp: multiple definition of
`HelloDesigner::HelloDesigner(QWidget*)'
release\hellodesigner.o(.text+0x1a00):hellodesigner.cpp: first defined here
release\hellodesigner.o(.text+0x7a0):hellodesigner.cpp: multiple definition of `
HelloDesigner::readSettings()'
release\hellodesigner.o(.text+0x7a0):hellodesigner.cpp: first defined here
E:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot fin
d -lqt-mt
collect2: ld returned 1 exit status
mingw32-make: *** [release\helloDesigner.exe] Error 1Danke Linse