Results 1 to 2 of 2

Thread: Why My Qt Application Don't SHow?

  1. #1
    Join Date
    Mar 2011
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Why My Qt Application Don't SHow?

    Hi,
    I am a new one ,studying the Qt and OpenCV.I just put the OpenCV2.2 integration in Qt4.7.The steps likes this:Creating a QGui Application and in the .pro file add the INCLUDEPATH=INCLUDEPATH +=C:/OpenCV2.2/include
    INCLUDEPATH +=C:/OpenCV2.2/include/opencv
    LIBS +=C:/OpenCV2.2/bin/*.dll
    I want to show the image using the OpenCV function and the codes likes:
    Qt Code:
    1. void Widget::slot_showimage()
    2. {
    3. img=cvLoadImage("11.bmp");
    4. cvNamedWindow("11.bmp",0);
    5. cvShowImage("11.bmp",img);
    6. cvWaitKey(0);
    7. //QTimer::singleShot(100000,this,SLOT(close()));
    8. cvDestroyWindow("11.bmp");
    9. }
    To copy to clipboard, switch view to plain text mode 
    the Compile passed but it doesn't show the image window and the exited code likes this:
    Starting E:\Qt_pratise\untitled4\debug\untitled4.exe...
    E:\Qt_pratise\untitled4\debug\untitled4.exe exited with code -1073741515

    I don't know why?
    Last edited by wysota; 8th March 2011 at 12:03.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Why My Qt Application Don't SHow?

    You have your [code] tags the wrong way around.

    You will need to set a breakpoint in the code and single step to find where it crashes and why. We can only guess with the information you have given us (especially because it is not Qt code).

    Edit: I'd specifically check that the cvLoadImage() is returning a valid pointer, because the current working directory is probably not what you think it is and the file may not be found.

Similar Threads

  1. Replies: 3
    Last Post: 20th October 2010, 22:36
  2. Replies: 2
    Last Post: 6th July 2010, 13:35
  3. Application running but doesn't show up!!!
    By joandelason in forum Newbie
    Replies: 4
    Last Post: 21st March 2010, 09:37
  4. QProcess - How show/hide external application
    By markvi in forum Qt Programming
    Replies: 1
    Last Post: 7th January 2010, 14:42
  5. Run an application but show it in your own form?
    By triperzonak in forum Qt Programming
    Replies: 6
    Last Post: 27th September 2008, 02:37

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.