Results 1 to 2 of 2

Thread: Calling hide/show in QtDialog.exec causes dialog to close

  1. #1
    Join Date
    Oct 2016
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Calling hide/show in QtDialog.exec causes dialog to close

    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.
    Last edited by StefanH; 18th October 2016 at 19:42.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,546 Times in 1,496 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Calling hide/show in QtDialog.exec causes dialog to close

    Within exec() meaning that you have overwritten exec() or that you call hide() in a slot in the dialog?

    Cheers,
    _

Similar Threads

  1. Replies: 2
    Last Post: 18th June 2016, 06:43
  2. QDrag::exec is not calling QGraphicsView mouseRelease
    By wagmare in forum Qt Programming
    Replies: 0
    Last Post: 25th March 2015, 09:33
  3. On calling close() the ui does not close
    By gfernandes in forum Newbie
    Replies: 5
    Last Post: 27th February 2014, 08:31
  4. Strange failure (dialog exec close qt 5.1)
    By giancarlo.fir in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 29th October 2013, 10:07
  5. Calling QThread::exec() repeatedly
    By hb in forum Qt Programming
    Replies: 2
    Last Post: 26th June 2007, 20:24

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.