Results 1 to 2 of 2

Thread: Small data entry window, not part of the dialog

  1. #1
    Join Date
    Jul 2017
    Posts
    16
    Qt products
    Qt5
    Platforms
    Windows

    Default Small data entry window, not part of the dialog

    The title may be confusing but this is what i want to do: I have a button on a dialog that when clicked, i want a small window to popup where i can enter a code that is returned back to the calling dialog. I know that i can build a small QT model, with a small data entry and have it close when pressing the enter key. But is there any other way to do this on the fly?

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Small data entry window, not part of the dialog

    Take a look at QInputDialog. It may not be exactly what you want, but it will do the job with no work on your part except to call it and retrieve the value. Unlike an entry-only window, it does give the ability to cancel the input in an obvious way (by clicking a Cancel button). With a simple window, you'd need to define a custom key sequence (Esc or something) that signifies "cancel this input".
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. problems in a small dialog
    By franky in forum Newbie
    Replies: 6
    Last Post: 20th October 2016, 11:14
  2. Qt Widgets appearing small on Main Window
    By souvikkar.kar in forum Newbie
    Replies: 13
    Last Post: 12th September 2012, 09:11
  3. child window with very small size !!!
    By qlands in forum Qt Programming
    Replies: 9
    Last Post: 28th July 2011, 11:40
  4. Parentless window with no taskbar entry
    By durbrak in forum Qt Programming
    Replies: 6
    Last Post: 14th December 2006, 14:46
  5. Show/hide part of dialog with resizing.
    By Spockmeat in forum Qt Tools
    Replies: 6
    Last Post: 7th June 2006, 09:22

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.