Results 1 to 20 of 26

Thread: Please help me - make error

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question 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
    ===========

    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
    Thanks

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    Can you post some code?

  3. #3
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default

    just past here? I am based on example like I wrote. I mark the changed I did
    BTW: anyonw knows why there is no distractor?
    Attached Files Attached Files
    Last edited by marcel; 19th December 2007 at 09:29.

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    I hope this
    ===========================================
    imageviewer.h
    ===========
    isn't part of the header.

    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.

  5. #5
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question 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

  6. #6
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    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:
    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.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Please help me - make error

    Quote Originally Posted by high_flyer View Post
    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).

  8. #8
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question 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 and my project is stuck. can anyone assist me please?
    I use QT Eclipse integration.

  9. #9
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    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?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  10. #10
    Join Date
    Dec 2007
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question 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
    Last edited by marcel; 19th December 2007 at 11:20. Reason: Removed unnecessary code...

  11. #11
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Please help me - make error

    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.

Similar Threads

  1. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  2. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 02:49
  3. Qtopia core 4.2.2 cross compile make error
    By smiyai18 in forum Installation and Deployment
    Replies: 2
    Last Post: 28th August 2007, 17:04
  4. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19
  5. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 12:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.