Python Forum

Full Version: prompt for input in qlineedit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Are you looking for a way to prompt the user? If so, then use the QMessageBox widget.

Or were you asking something else?
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.