Results 1 to 12 of 12

Thread: Window Modality question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    4
    Thanked 140 Times in 132 Posts

    Default Re: Window Modality question

    what's the point of NOT using QDialog if what you want to do is exactly what QDialog DOES and it gives you for free?

    P.S. and can you show us more code? I don't have any problem in setting my widget application modal:
    Qt Code:
    1. Form *form = new Form;
    2. form->setWindowModality(Qt::ApplicationModal);
    3. form->show();
    To copy to clipboard, switch view to plain text mode 
    Last edited by faldzip; 25th May 2009 at 10:43.
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  2. #2
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Qt products
    Qt4
    Platforms
    Windows Android
    Thanks
    14
    Thanked 13 Times in 13 Posts

    Default Re: Window Modality question

    what's the point of NOT using QDialog if what you want to do is exactly what QDialog DOES and it gives you for free?
    Because my dialog box has many particular cosmetic differences due to my project description and that's why couldn't provide more code:/. I hope the following lets you understand the case more clearly.

    Qt Code:
    1. mMessageDialogs.reset(new MessageDialogs(this->parentWidget(),1,1,"WARNING","blablabla"));
    2. mMessageDialogs->hide();
    3. mMessageDialogs->setWindowModality(Qt::ApplicationModal);
    4. mMessageDialogs->move(this->x()+100,this->y()+300);
    5. mMessageDialogs->show();
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    4
    Thanked 140 Times in 132 Posts

    Default Re: Window Modality question

    and what if you set parent = 0?
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

Similar Threads

  1. How to set Qt window transparent?
    By montylee in forum Qt Programming
    Replies: 17
    Last Post: 24th December 2013, 20:11
  2. Set a window as child at runtime
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 26th November 2007, 09:30
  3. Change shape of window / animate window
    By sabeesh in forum Qt Programming
    Replies: 3
    Last Post: 31st October 2007, 08:16
  4. move parent window to the front.
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2007, 08:41
  5. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 10:21

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
  •  
Qt is a trademark of The Qt Company.