Python Forum
[PyQt] Why lineEdit is showing text like this ??
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Why lineEdit is showing text like this ??
#12
Perhaps it does not need to be done any more but I was getting errors when not referencing the class within super() so I assumed it was a necessary feature that if not done might cause issues. I rarely use super() I normally just code it as follows:

class MyLineEdit(QLineEdit):
     def __init__(self, parent):
        QLineEdit.__init__(parent)
Next the Designer versus real PyQt code. I have shown numerous individuals what the difference is between what the Designer creates and what actual PyQt code would look like and once they see how actual PyQt code looks like they find that it is actually as fast to create the initial object using it (and faster if you have done it at least once and have template to copy/paste from) and perhaps 5 times to 10 times easier to work with post creation since it no longer is some black box that you do not understand how it works.

That being said if you post an MRE (Minimal Reproducible Example) of your code with the UI -- I will show you how to code the Designer part so that you can then do away with using it going forward. Your code will be the much better for as will your sanity ;)
Reply


Messages In This Thread
RE: Why lineEdit is showing text like this ?? - by Denni - Sep-10-2019, 01:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyGUI] Showing text in QTableView sequence 0 3,125 Jan-20-2019, 05:00 PM
Last Post: sequence
  [PyQt] Need Help about comboBox and lineEdit DeanONeil 1 2,729 Oct-13-2017, 05:42 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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