Moving the opencv window on top Qt(c++) dialogs/widgets
I am new to Qt. I am developing a Qt(c++) and opencv application on Ubuntu 14.
My application has three Qt diaglog windows.The 2nd dialog opens by pressing the pushbutton on the first dialog. The 3rd dialog opens by pressing the pushbutton on the 2nd dialog.
In the 3rd dialog on the press of a push button i do some image processing operations using opencv and display the results using opencv function namedWindow. This is shown in image1 .
The problem is that i am not able to move opencv windows("source" and "centers") on top of the 3 qt dialogs. This is shown in image2. I,e i want to bring the opencv windows to foreground.
How do i move the opencv windows on top of all the qt dialogs(bring it to foreground) and have complete access to the opencv window to perform operations like clicking on pixels, rectangular selection , thresholding using scroll bar(basically mouse call back) on the opencv window.
Please help me out with this problem
How are you showing the dialogs?
Dialogs are pr default modal, meaning they block other windows from interaction while open.
if you use exec() it will block.
if you use show(), they will not. ( make sure to new the dialog or it runs out of scope)
Maybe you rather have at Qt:tool window if design is to have the dialog open while
using the mainwindow?
You might also considering docks
which can both float as windows and be in the sides.
Thanks for the reply.
I am using the show() option (by newing the dialog). But still i am not able to get the two image windows to the foreground. The two image windows("source" and "center") are from opencv (cv::namedWindow) .
Will i face any problem if i use qt for developing GUI and opencv for image processing operations? (I read on the internet that qt and opencv run on different threads. Is this true?)
Hmm are you saying those are openCV windows?
Yes they are opencv windows.
ok, are those made with Qt or native windows ?
It seems to be native windows and as such, they know nothing
about Qt widgetstack/order.
They do talk about Qt at their site.
Normally people use the output in Qt windows/widgets
You might be able to wrap the CV window in
so they become part of the Qt system.
Are CV windows actually Qt powered ?
Yes opencv windows are developed using qt.
Ok, should just work then.
Are you giving them a parent ?
Did raise have any effect ?
No. I used lower() to lower the qt widget window but still the same result.
ok, hard to tell whats up with those.
maybe look in the CV source to see what flags are used to create them.
Also if you are giving the QDialog parents (like dialog where u open second),
they might stay over those etc.
Sorry, i cant provide more direct tips.- I dont know CV windows.
I think we should make changes in the qt code used to implement the opencv window
well at least check out what flags are used to create them.
i checked the header and cpp files for the opencv window GUI. I was not able to figure out .
how do i check for the flags?