Python Forum
prompt for input in qlineedit
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
prompt for input in qlineedit
#1
Hi all,

May I know how to call for prompt for an input in qlineedit?

For example:
1. User first input a value in qlineedit.
2. I program to check whether the input is integer only, if not ask user to input again in same qlineedit.

Please help.

Thanks
Reply
#2
Are you looking for a way to prompt the user? If so, then use the QMessageBox widget.

Or were you asking something else?
Reply
#3
Have a look at this
https://stackoverflow.com/questions/1342...ly-numbers
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply
#4
Dear all,

Thanks for the reply.

I found a better way to do it.

Instead of asking the user to input and check whether is integer or not in qlineedit.

I use qspinbox to solve this problem. User can either input integer or double only, not something else.

Thanks.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] QLineEdit Caret (Text Cursor) Transparency malonn 5 2,738 Nov-04-2022, 09:04 PM
Last Post: malonn
  How to accept only float number in QLineEdit input ism 5 28,127 Jul-06-2021, 05:23 PM
Last Post: deanhystad
  Simple printing the text for a QLineEdit thewolf 16 7,659 Mar-06-2021, 11:37 PM
Last Post: deanhystad
  PyQt5: How to retrieve a QLineEdit by its name ? arbiel 4 7,752 Oct-21-2020, 02:35 PM
Last Post: arbiel
  Two QlineEdit box, which interrelated GMCobraz 1 2,372 Aug-14-2020, 07:15 PM
Last Post: deanhystad
  [PyQt] Dynamically add and remove QLineEdit's GMCobraz 3 7,090 Jun-23-2020, 07:01 PM
Last Post: Yoriz
  [PyQt] display content from left to right in QComboBox or QLineEdit mart79 2 2,254 May-30-2020, 04:38 PM
Last Post: Axel_Erfurt
  How to loop through all QLineEdit widgets on a form JayCee 6 6,596 Apr-03-2020, 12:15 AM
Last Post: JayCee
  [PyQt] How to clear multiple Qlineedit in a loop mart79 6 7,642 Aug-15-2019, 02:37 PM
Last Post: Denni
  How to validate multiple QLineEdit widgets without addressing them separately? mart79 3 4,186 Aug-08-2019, 12:50 PM
Last Post: Denni

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020