Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

QFormLayout: Setting Font Size

$
0
0
I have a simple QFormLayout and have assigned some labels to the row fields like so: labelSavedGameCreatedDate = new QLabel("n/a"); labelSavedGameCreatedDate->setFont(QFont("MS Shell Dlg 2", 10));   [...]   ui->formSavedGameInfo->addRow(tr("Game Created"), labelSavedGameCreatedDate); As you can see, I’m setting the font size of the labels in the fields so that they are size 10, a little larger than the default size 8. However, I’m not sure how to set the font size of the row labels themselves. I’ve been Googling and looking through the QFormLayout and QLayout documentation but cannot see anything which sets the font size of the row labels. Is this possible or is it always set to the default size of the operating system? Assuming it’s not possible, I suppose I’ll have to go with a QGridLayout instead – it’s just that I like the simplicity of setting rows with QFormLayout.

Viewing all articles
Browse latest Browse all 13965

Trending Articles