Ask Your Question
0

Can't find the button create by cvCreateButton

asked 2012-12-17 20:56:49 -0600

Gianluigi gravatar image

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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2012-12-23 10:07:24 -0600

AMP gravatar image

click on "Display properties window" button at top of the window or CTRL+P,now you can see your button.

edit flag offensive delete link more

Comments

1

Is there a way of doing this automatically as the window or button is created?

Johan Stigwall gravatar imageJohan Stigwall ( 2013-05-22 09:49:35 -0600 )edit

I don't think so...

AMP gravatar imageAMP ( 2013-05-22 09:58:18 -0600 )edit

I would also like to display the panel automatically..

razvan gravatar imagerazvan ( 2016-04-08 05:11:57 -0600 )edit

Question Tools

Stats

Asked: 2012-12-17 20:56:49 -0600

Seen: 3,898 times

Last updated: Dec 23 '12