Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Quoted
Originally posted by marioo
but if i copy the exe file in another place, the program work but without the icons.why?
This post has been edited 1 times, last edit by "jacek" (Jul 1st 2005, 10:00pm)
|
|
Source code |
1 2 |
k = QDir::currentDirPath(); k.append( "/jobs/" + projectIndex + "/" + f ); |
Quoted
Originally posted by marioo
on have to be able to compile and the exe file have to contains all functions and icons..
Quoted
Originally posted by impeteperry
Is this the same problem?
Quoted
IMAGES += img1.png ...
Quoted
######################################################################
# Automatically generated by qmake (1.06c) Fr 1. Jul 21:57:40 2005
######################################################################
TEMPLATE = app
INCLUDEPATH += .
# Input
HEADERS += abfrage.h admineditor.h ergebnisse.h mainwindow.h update.h
IMAGES += img1.png
SOURCES += abfrage.cpp \
admineditor.cpp \
ergebnisse.cpp \
main.cpp \
mainwindow.cpp \
update.cpp
Quoted
Originally posted by marioo
i think thats it! But where have i to code:
...
in the .pro?
Quoted
Originally posted by marioo
If i give now this exe to another person, i dont have to give the icon too right?
Only they will be hidden inside your executable --- you won't need any additional files.
Quoted
It is important to use QPixmap::fromMimeSource() ??
Quoted
Originally posted by marioo
so, i have to put : QPixmap::fromMimeSource() there where i am using the icons? For example in the mainwindow.cpp??
|
|
Source code |
1 |
QPixmap pixmap = QPixmap::fromMimeSource("img1.png");
|
Quoted
Originally posted by marioo
this was generated by the designer:
|
|
Source code |
1 |
QApplication::applicationDirPath(). |
|
|
Source code |
1 2 3 |
k = QApplication::applicationDirPath(); //k = QDir::currentDirPath(); k.append( "/jobs/" + projectIndex + "/" + f ); |
|
|
Source code |
1 |
dlgmain.cpp:905: error: cannot call member function `QString QApplication::applicationDirPath()' without object |
|
|
Source code |
1 |
QApplication myApp = new QApplication( this ); |
|
|
Source code |
1 2 3 |
k = myApp.applicationDirPath(); //k = QDir::currentDirPath(); k.append( "/jobs/" + projectIndex + "/" + f ); |
|
|
Source code |
1 2 3 4 5 6 7 |
usr/lib/qt-3.3/include/qapplication.h:435: note: candidates are: QApplication::QApplication(const QApplication&) /usr/lib/qt-3.3/include/qapplication.h:81: note: QApplication::QApplication(Display*, int,char**, long unsigned int, long unsigned int) /usr/lib/qt-3.3/include/qapplication.h:79: note: QApplication::QApplication(Display*, longunsigned int, long unsigned int) /usr/lib/qt-3.3/include/qapplication.h:77: note: QApplication::QApplication(int&, char**, QApplication::Type) /usr/lib/qt-3.3/include/qapplication.h:75: note: QApplication::QApplication(int&, char**, bool) /usr/lib/qt-3.3/include/qapplication.h:74: note: QApplication::QApplication(int&, char**) dlgmain.cpp:167: warning: unused variable 'myApp' |
Quoted
Originally posted by impeteperry
and got the error message
![]()
Source code
1 dlgmain.cpp:905: error: cannot call member function `QString QApplication::applicationDirPath()' without object