title: OpenCV image is not showing
body: <p>I am working on the following code:</p>
  
  <p><strong>Main.cpp</strong></p>
  
  <pre><code>#include &lt;opencv2/highgui/highgui.hpp&gt;
  #include &lt;iostream&gt;
  
  using namespace cv;
  using namespace std;
  
  int main()
  {
      Mat im = imread("C:/Users/Public/Pictures/Sample Pictures/Koala.jpg");
      if (im.empty())
      {
          cout &lt;&lt; "Cannot load image!" &lt;&lt; endl;
          return -1;
      }
      imshow("Image", im);
      waitKey(0);
  
      return 0;
  }
  </code></pre>
  
  <p>I am trying to test the OpenCV with QT, by simply opening an image. This is my very first QT application. However, the program runs, but there is no image display! The same code runs in VS 2010 and display the image correctly. Following is the only output I get from QT.</p>
  
  <p><img src="https://i.stack.imgur.com/BWEtE.png" alt="enter image description here"></p>
  
  <p>Following is my QT Project configuration.</p>
  
  <p><strong>Tester.pro</strong></p>
  
  <pre><code>#-------------------------------------------------
  #
  # Project created by QtCreator 2013-04-25T23:36:30
  #
  #-------------------------------------------------
  
  QT       += core
  
  QT       -= gui
  
  TARGET = Tester
  CONFIG   += console
  CONFIG   -= app_bundle
  
  TEMPLATE = app
  
  
  SOURCES += main.cpp
  
  INCLUDEPATH += C:\opencv\build\include\
  
  LIBS += -LC:\opencv\build\x86\mingw\lib\
  -lopencv_core240 \
  -lopencv_highgui240 \
  -lopencv_imgproc240 \
  -lopencv_features2d240 \
  -lopencv_calib3d240
  </code></pre>
  
  <p>Here are the version I am using:</p>
  
  <ul>
  <li>My OS - Windows 7 Ultimate</li>
  <li>QT Creator version - 2.7.0</li>
  <li>QT Downloaded from - <a href="http://qt-project.org/downloads" rel="nofollow noreferrer">http://qt-project.org/downloads</a> (File Name is: qt-windows-opensource-5.0.2-mingw47_32-x86-offline)</li>
  <li>OpenCV Version - 2.4</li>
  <li>MinGW Version - Was installed sometime back in the 9th month of 2012. Don't know how to get the version number.</li>
  </ul>
  
  <p>How can I make this opencv task work correctly?</p>
  
  <h2>Update</h2>
  
  <p>I just checked the .exe file it built. It gives the following error when I double click on it</p>
  
  <p><img src="https://i.stack.imgur.com/LRweN.png" alt="enter image description here"></p>