Set QLineEdit width in 1 symbol
Unsolved
General and Desktop
-
Hello, how can I set starting width for QLineEdit instance in 1 character? Instance will be placed at QGridLayout. QLineEdit's default width is too big for using table 9x9 QLineEdits. (No way for using models because their usage is a bit complicated for a very simple app).
-
Did you try setFixedSize(5,5) ?
-
@Northsoft As @JonB said the width of you line edit depends on the used font.
-
@Northsoft Take a look at https://doc.qt.io/qt-5/qfontmetrics.html
-