Results 1 to 2 of 2

Thread: How to make QInputDialog box modal less?

  1. #1
    Join Date
    Apr 2020
    Posts
    6
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default How to make QInputDialog box modal less?

    I am using multiple QInput Dialog boxes in my UI, using the syntax like

    Qt Code:
    1. QString s = QInputDialog::getText(this,"Sleep Command ","Enter the number of seconds" );
    To copy to clipboard, switch view to plain text mode 


    but when ever these Input dialog boxes pops up, the mainwindow becomes unresponsive, so how do i make all the QInputDialog boxes "modal less " and the mainwindow always stays responsive ??

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to make QInputDialog box modal less?

    Do not use the static convenience functions, they give you a modal dialog.
    Connect the textChanged() signal to a slot that will handle the changed value, and call dialog->show(). You can try QInputDialog::open() but I do not know if this gives you a modal or modeless dialog.

Similar Threads

  1. Modal dialog only modal to base window?
    By SvenA in forum Qt Programming
    Replies: 3
    Last Post: 10th April 2015, 10:25
  2. how to make the pop up widget as modal ?
    By kongkong163 in forum Qt for Embedded and Mobile
    Replies: 9
    Last Post: 19th March 2011, 10:57
  3. How to make modal widget wait for input after it is shown.
    By cuiqimeng in forum Qt Programming
    Replies: 4
    Last Post: 17th December 2010, 07:12
  4. How to make window semi modal
    By kaushal_gaurav in forum Qt Programming
    Replies: 7
    Last Post: 29th August 2008, 09:27
  5. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 11: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.