Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User dev_null815's Avatar
    Join Date
    Oct 2010
    Posts
    4
    Hi,

    I'm new to Qt, so please be patient with a probably simple question. I'm trying to show a (modal) dialog when a button is pressed in my main window. This is based on QWidget and displayed with .showFullScreen().
    The Dialog was created with the dialog designer of Qt Creator. In the slot function which is called when the button is pressed, I instantiate an object from the class created by the designer. I expected to be able to display it by simply calling its .exec() method. But I found that I have to first hide my main window to be able to see the dialog. But there should be a way to have the dialog simply appear on top of the main window.

    Can anyone tell me what I'm missing here?

  2. #2
    Nokia Developer Champion danhicksbyron's Avatar
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209
    Maybe you need to show() the dialog?

  3. #3
    Registered User dev_null815's Avatar
    Join Date
    Oct 2010
    Posts
    4
    Sorry, I forgot to mention this. Of course, I did call the .show() method of the dialog before doing the .exec().
    But it only appears when I hide the main window.

  4. #4
    Nokia Developer Moderator divanov's Avatar
    Join Date
    Oct 2009
    Posts
    4,326
    Did you parent a dialog to the main window?

  5. #5
    Registered User dev_null815's Avatar
    Join Date
    Oct 2010
    Posts
    4
    Damn, I knew it would be some really stupid mistake.
    Of course I omitted the parent parameter, so it defaulted to null.

    Thank you very much for this quick diagnosis of my problem.

Similar Threads

  1. Display Yes/No Dialog
    By fatah3000 in forum Symbian C++
    Replies: 1
    Last Post: 2010-06-30, 11:20
  2. Simple beginners problem
    By przemast in forum Symbian C++
    Replies: 6
    Last Post: 2009-08-07, 10:30
  3. Beginners Dll-problem
    By juhanay in forum Symbian C++
    Replies: 1
    Last Post: 2006-04-08, 05:22
  4. dialog display problem
    By royashok in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-06-27, 16:03
  5. how can i display a dialog?
    By sridhar_ratna in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-04-18, 07:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved