Results 1 to 12 of 12

Thread: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86

  1. #1

    Default Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86

    Hi all, in these days i tried to configure qtcreator to work with opencv but i couldn't find a solution.
    i wanted to create a programm that opens a webcam and show it in a qt Widget.
    I am new to qt and opencv (not to c++) so i would like if you tell me what to do step by step.
    Sorry for my bad english :/ i hope you can help me.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86

    I havn't a creator 5.0.1 only 2.6.2 unfortunatelly. Further you don't have to configure anything in Qt Creator. Only "configure" the pro file right, that the libraries can be found.

    What have you tried? What error do you get?

  3. #3

    Default Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86

    i have tried almost all the code i found in internet and.
    here's my .pro:
    FORMS += mainwindow.ui


    INCLUDEPATH += C:\opencv\build\include


    LIBS +=-LC:\opencv\build\x86\mingw\lib\
    -lopencv_calib3d243\
    -lopencv_contrib243 \
    -lopencv_core243\
    -lopencv_features2d243\
    -lopencv_flann243\
    -lopencv_gpu243\
    -lopencv_highgui243\
    -lopencv_imgproc243\
    -lopencv_legacy243\
    -lopencv_ml243\
    -lopencv_nonfree243\
    -lopencv_objdetect243\
    -lopencv_photo243\
    -lopencv_stitching243\
    -lopencv_ts243\
    -lopencv_video243\
    -lopencv_videostab243
    if i create a new project and add what i wrote to my .pro the app doesnt start and gives this error "The program has unexpectedly finished."

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86

    So it does start. Then it is not a problem with Qt Creator. Use a debugger and see where the application crashes.

  5. #5

    Default Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86

    ok, i created a new console project and with the .pro i pasted before all worked fine, but if i create a new gui application it gaves that error message..
    Don't you know what to write into the .pro file to make all opencv project work ??

  6. #6
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86

    Quote Originally Posted by marcocadei View Post
    Don't you know what to write into the .pro file to make all opencv project work ??
    C&P dind't helped you much, why do you think it would now? Use a debugger and look at the backtrace to see where the programm crashes.

  7. #7

    Default Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86

    ok, i think i have another problem now: even if i make a new gui project and run it gives me that error and if i debug it says :

    "C:\Users\Marco Cadei\Desktop\prova-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug\Makefile.Debug:229: warning: overriding recipe for target `ui_mainwindow.h'

  8. #8
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86

    Fine and what is my crystal ball supposed to say now?

    Try clean the project, rerun qmake and build the project again.

  9. #9

    Default Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86

    Ok, now it disappeared.
    new error: qmainwindow: no suche file or directory
    do you know how to fix this ?
    (really thanks for your help, i'm really a greehorn )

  10. #10
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86

    Quote Originally Posted by marcocadei View Post
    (really thanks for your help, i'm really a greehorn )
    I've noticed that I can't tell you what causes that error, because you have to be a little bit more elaborate. How does the line looks like which throws that error? I guess you should write "#include <QMainWindow>".

  11. #11

    Default Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86

    the error is on the line #include <QMainWindow>
    i only created a new gui project (i didn't write anything)
    i've never seen this error..

  12. #12

    Default Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86

    Sorry but i have to exit, can u tell me your email address ? (thanks again, see you soon )

Similar Threads

  1. OpenCV integration with Qt creator
    By mind_freak in forum Qt Programming
    Replies: 11
    Last Post: 8th January 2013, 22:50
  2. Qt 4.8.3 - QtCreator 2.6.0 - MinGW 4.4 and OpenCV 2.4.3
    By giorgik in forum Qt Programming
    Replies: 1
    Last Post: 21st November 2012, 18:35
  3. Qt Creator Can't debug the program with OpenCV in Qt Creator
    By nimingzhe2008 in forum Qt Tools
    Replies: 6
    Last Post: 15th June 2012, 15:04
  4. Qt Creator and OpenCV , .dll missing
    By schludy in forum Newbie
    Replies: 0
    Last Post: 30th November 2011, 10:11
  5. Using OpenCV with QT creator
    By gmiller39 in forum Newbie
    Replies: 3
    Last Post: 7th July 2010, 15:32

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.