PDA

View Full Version : Calling hide/show in QtDialog.exec causes dialog to close



StefanH
18th October 2016, 18:58
Problem:
I try to call hide() and show() within the exec() method of a qt dialog.
The problem ist, that this command order exits the exec()-Method.
Is their any possibility to avoid this?

Background:
I need to mix Mfc and Qt and try to exec an MFC Dialog from an Qt dialog.
The problem is that there seems to be no possibility to bring my MFC dialog in front of the modal top level Qt Dialog.
The MFC windows allways stays in the background and can not therefore not be used.
So I tried to hide my qDialog before I sho the MFC one.
As soon as the MFC dialog closes I want to show my Qt dialog again.

anda_skoa
19th October 2016, 19:44
Within exec() meaning that you have overwritten exec() or that you call hide() in a slot in the dialog?

Cheers,
_