Issue
I am working with a GUI based on PySide. I made a (one line) text box with QLineEdit
and the input is just four characters long, a restriction I already successfully applied.
The problem is I have a wider than needed text box (i.e. there is a lot of unused space after the text). How can I shorten the length of the text box?
I know this is something that is easily fixed by designing the text box with Designer; however, this particular text box is not created in Designer.
Solution
If what you want is modify your QLineEdit
width and fix it, use:
#setFixedWidth(int w)
MyLineEdit.setFixedWidth(120)
Answered By - SRD
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.