How to use createButton ?
I'm currently going through the samples and looking at how to add GUI elements. Starting from connectedcomponents.cpp I've managed to get understand how a trackbar works. Now I'm trying to add a button. Here's a basic snippet:
void on_button(int, void*){
cout << "click" << endl;
}
//in main
createButton("test",on_button);
Before I got some link issues related to QtCore/QtGui. I've updated the OpenCV port to 2.4.2 with qt4 and the link error is gone and I can see some nice Gui elements in the namedWindow, but I can't see the button I created. Any hints/tips on what I'm doing wrong ?
Thanks!
Hmm, just noticed the Button shows up in the Display Properties Window. Any way to get the button to display in the same 'vbox'/container with the trackbars ?
My bad, clear case of RTFM on my side. Found this page explaining how createButton works. As far as I understand a button will always end up in the control panel, correct ?