Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can't find the button create by cvCreateButton

I just can't find the button anywhere.
The document says it will attach on control panel, but I never saw one.
I use OpenCV 2.4.3 with Qt4 on Ubuntu 10.04.
Below is my short test code.

#include <string>
#include <opencv2/opencv.hpp>

using namespace std;
using namespace cv;

void on_push(int state, void*) {}

int main(int argc, char* argv[])
{
    char winName[] = "TEST";
    Mat image = imread("000001.jpg", 1);

    namedWindow(winName, CV_WINDOW_NORMAL | CV_WINDOW_KEEPRATIO);
    resizeWindow(winName, 1280, 960);
    createButton("draw", on_push);

    imshow(winName, image);
    waitKey();

    return 0;
}

Is there any problem when I use it?