Ask Your Question
0

Display properties window on default

asked 2017-03-30 04:19:38 -0600

Markus Bader gravatar image

Hi

I like to show the properties window on default without having a user to press Ctrl+P or right-click any Qt window and select Display properties window.

Is there a nice way?

Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-03-30 11:39:20 -0600

kbarni gravatar image

updated 2017-03-30 11:40:49 -0600

Short answer: unfortunately no.

Long answer: no, but maybe you can hack the source code. It's in the modules/highgui/src/window_QT.h and windows_QT.cpp file.

I think it's possible to create a function to get the pointer to the property window in windows_QT.cpp:

CvWinProperties* getPropertyWindow()
{ return global_control_panel; }

and add the function header to the windows_QT.h file

In your program you can call this function to get a pointer to the property dialog:

CvWinProperties* propwin=getPropertyWindow();
if ( propwin != NULL )
    propwin->show();

You should call this function after the creation of the first window (that's when the control panel is created).

Disclaimer: this is an untested method, do it at your sole responsibility. If you want to play with the source code, better know what you are doing.

That said, it's not perfect, so you can modify it to make it better, that's why OpenCV is open source.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-03-30 04:19:38 -0600

Seen: 780 times

Last updated: Mar 30 '17