layout for display functions
hey there i am making a grid layout and i have 2 QLineEdit displayboxs with 1 under the other. is there a way to make the display boxes smaller in width:
Code:
display->setReadOnly(true);
display->setAlignment(Qt::AlignCenter);
display->setMaxLength(10);
display->installEventFilter(this);
QFont font
= display
->font
();
font.setPointSize(font.pointSize() + 8);
display->setFont(font);
display2->setReadOnly(true);
display2->setAlignment(Qt::AlignCenter);
display2->setMaxLength(10);
display2->installEventFilter(this);
QFont font2
= display2
->font
();
font2.setPointSize(font2.pointSize() + 8);
display2->setFont(font2);
Re: layout for display functions
Set size hints for the line edits or use spacer items to "pack" them to a certain corner.
Re: layout for display functions
You can use different sizePolicy settings to manipulate the behaviour of widgets.