Designing OpenCV GUI with Qt
<p>I want to customize Qt's GUI</p>

<p>Here is the Default Qt OpenCV GUI</p>

<p><a href="https://i.stack.imgur.com/nTeAf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nTeAf.png" alt="When You Click on Display Properties Button"></a> </p>

<p>I want to place createButton on Menu.</p>

<p><a href="https://i.stack.imgur.com/nYnTK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nYnTK.png" alt="enter image description here"></a></p>

<p>How can I do that?</p>

<p>Below is my code</p>

<pre><code>#include "mainwindow.h"
#include &lt;QApplication&gt;

#include &lt;opencv2/core/core.hpp&gt;
#include &lt;opencv2/opencv.hpp&gt;
#include &lt;opencv2/highgui/highgui.hpp&gt;

#include &lt;iostream&gt;

void callbackButton2(int state, void* userData){

}

int main(int argc, char *argv[])
{
//QApplication a(argc, argv);
//MainWindow w;
//w.show();
cv::VideoCapture vc(0);
if(!vc.isOpened()) perror("Can't Open WebCam");

const char* winname = "WebCam";
cv::namedWindow(winname,CV_GUI_EXPANDED);

cv::createButton("button6",callbackButton2,NULL,CV_PUSH_BUTTON,1);
for(;;){
    cv::Mat frm;
    vc&gt;&gt;frm;
    if(!frm.empty()) imshow(winname,frm);
    if(cv::waitKey(20)==27) break;
}
vc.release();
cv::destroyWindow(winname);

return 0;
// return a.exec();
}
</code></pre>

<p>The code above simply opens webcam and display it on the screen. But for my next application, I need to customize gui and place it on to the menu.</p>

<p>BTW I searched through the fllowing link, and I couldn't find how can I customize the GUI. <a href="http://docs.opencv.org/2.4/modules/highgui/doc/qt_new_functions.html" rel="nofollow noreferrer">http://docs.opencv.org/2.4/modules/highgui/doc/qt_new_functions.html</a></p>