Deebalaji asked
I am Newbie to Python and PyQt5.
Just I want to know, How to create a Class/Module to check whether the
QLineEdit
is empty or not ? and how to import this Module in another Programme/File?
You don't need a class/module to check something as simple as that. PyQt5 Widgets all
have their own methods which can be used to get the current state of the widgets. On a QLineEdit
you can get the current contents using .text()
Since in Python an empty string "" is falsey and any content is truthy you can just use that value for your conditional, e.g.
if lineedit.text():
# do something if there is content in the line edit.
Hope that helps!