Please help me - make error
I run the sample project and got error:(
The project - C:\Qt\4.3.3\examples\widgets\imageviewer
===========
Severity and Description Path Resource Location Creation Time Id
make[1]: *** [release\imageviewer.exe] Error 1 imageviewer line 0 1198013082034 730
make: *** [release] Error 2 imageviewer line 0 1198013082034 731
===========:crying::crying:
When I import the project it works fine but, I added - save option and got this error. Since there is not line number I am not sure how to debug it :rolleyes:
Thanks
Re: Please help me - make error
Re: Please help me - make error
I hope this
Quote:
===========================================
imageviewer.h
===========
isn't part of the header.
Quote:
BTW: anyonw knows why there is no distractor?
Because the actions and menus are deleted by their QObject parents. Now that you've added the QImage pointer you should add a destructor and delete that QImage in there.
Re: Please help me - make error
yes, sorry, I just added is by mistake to the forum- it is not in the code
===========================================
imageviewer.h
===========
---------------------------------------------------------------
I attached all the file at the end of my last message.
---------------------------------------------------------------
about the distractor:
you wrote
"now that you've added the QImage pointer you should add a destructor and delete that QImage in there"
but what about the QLabel? I don't see why there is no distractor for the label, there is no difference between QLabel and QImage (or I am wrong?)
thanks:)
Re: Please help me - make error
Quote:
but what about the QLabel? I don't see why there is no distractor for the label, there is no difference between QLabel and QImage (or I am wrong?)
thanks
QObject docs:
Quote:
QObjects organize themselves in object trees. When you create a QObject with another object as parent, the object will automatically add itself to the parent's children() list. The parent takes ownership of the object i.e. it will automatically delete its children in its destructor. You can look for an object by name and optionally type using findChild() or findChildren().
But if you QObject is parent less, you need to take care of cleaning it your self.
Re: Please help me - make error
Quote:
Originally Posted by
high_flyer
But if you QObject is parent less, you need to take care of cleaning it your self.
Just note that even if you didn't point the parent explicitely, the widget might get reparented by Qt (for instance if you add it to a layout).
Re: Please help me - make error
now I understand the the distractor aspect, thanks.
is it a mistake to write distractor, or is it just not needed?
still have the make problem :confused: and my project is stuck. can anyone assist me please?
I use QT Eclipse integration.
Re: Please help me - make error
Quote:
When I import the project it works fine but, I added - save option and got this error.
What steps did you take?
Can you list them in order?
Re: Please help me - make error
sure
yo can also see them in the files above in their content(I maked them)
oops is it possible that someone erased them?
hope it will bw clear now
I chnage 2 file: imagevewer.h ,imagevewer.cpp
I wanted to add save and more menu-effects
Re: Please help me - make error
Quote:
oops is it possible that someone erased them?
Yes, I deleted the inline code because you already attached the source files.
Please don't post anymore code that already is in the files you attached.
Re: Please help me - make error
I didn't mean code changes, but in the project.
But that is not relevant I see, since you changed only code in already existing project files, so basically your project is the same as before the changes if I understand correctly.
Re: Please help me - make error
if you do qmake make from the console (Qt console!) does it compile then?
1 Attachment(s)
Re: Please help me - make error
Hi All
I changed the code from the original project. I wrote the changes above but marcel prefer to delete them
like I wrote I add save and effect that were not in the original project. if the project file doesn't change automaticly I didn't change it.
ok, did my best and make in prompt window
this is the result.
BTW:this is the way you debug in QT? not so freindly:-(
-----------------------------------------------------------------------------------------------------
:\download\poy>make imageviewer
++ imageviewer.cpp -o imageviewer
mageviewer.cpp:37:17: QtGui: No such file or directory
n file included from imageviewer.cpp:39:
mageviewer.h:40:23: QMainWindow: No such file or directory
mageviewer.h:41:20: QPrinter: No such file or directory
..
..
..
see in the file attached
Re: Please help me - make error
did you do this in Qt console or the normal console?
It looks your Qt environment is not set in the console you did this.
Run qmake before you run make too.
Quote:
BTW:this is the way you debug in QT? not so freindly:-(
Well, as far as windows goes, I find it much friendlier then the IDE's.
Usually, all you need to do is qmake & make and it will compile (provided your environment is setup correctly), while the IDE will tangle and to problems with the same project tree.
In addition, this way you can be sure that its not some IDE related issue.
Re: Please help me - make error
delete existing pro file?
Re: Please help me - make error
huh?
why?
If all your sources are in one directory though, you could - or just do:
qmake -project
Re: Please help me - make error
I did
what happend is:
C:\Documents and Settings\chikon\My Documents\Eclips projects\poy3>qmake -project
C:\Documents and Settings\chikon\My Documents\Eclips projects\poy3>make imagevier
mingw32-make: *** No rule to make target `imagevier'. Stop.
Re: Please help me - make error
this is what happend
C:\Documents and Settings\chikon\My Documents\Eclips projects\poy3>qmake -project
C:\Documents and Settings\chikon\My Documents\Eclips projects\poy3>qmake poy3.pro
C:\Documents and Settings\chikon\My Documents\Eclips projects\poy3>make roy3
mingw32-make: *** No rule to make target `roy3'. Stop.
==========================================
I saw there is poy3.pro in the folder
==========================================
"asked him to. Don't expect us to read two codes and compare them line by line manually. We assumed both sets contain the same content."
I am sorry I just wanted to give all the information have.
at the first time I manualy added //change near every line I changed
in the second time I just put the code I changed
please tell me what is the best way to give the info, so I can be helped
thanks