Nothing.
The problem is size, not the font family.
I see ~12pt letters and I want it 2pt (or a bit bigger, anyway much smaller than what I see).
The code:
setFixedSize(300,300);
mainHeader.setText(tr("Your result will be saved as soon as\n you fill the input area and click ok."));
qDebug
(qPrintable
(QString::number(mainHeader.
fontInfo().
pointSize())));
//the code above shows always 9!!
mainHeader.setParent(this);
QFont mainHeaderFont
("Helvetica",
6,
QFont::Normal);
mainHeader.setFont(mainHeaderFont);
qDebug
(qPrintable
(QString::number(mainHeader.
fontInfo().
pointSize())));
//but the code above shows always 6 !! but the size does not change
mainHeader.setGeometry(5+35+10,5+25+10,280-2*35-2*10,40);
}
OrangeInquirer::OrangeInquirer(QWidget *parent) : QWidget(parent) {
setFixedSize(300,300);
mainHeader.setText(tr("Your result will be saved as soon as\n you fill the input area and click ok."));
qDebug(qPrintable(QString::number(mainHeader.fontInfo().pointSize())));
//the code above shows always 9!!
mainHeader.setParent(this);
QFont mainHeaderFont("Helvetica",6,QFont::Normal);
mainHeader.setFont(mainHeaderFont);
qDebug(qPrintable(QString::number(mainHeader.fontInfo().pointSize())));
//but the code above shows always 6 !! but the size does not change
mainHeader.setGeometry(5+35+10,5+25+10,280-2*35-2*10,40);
}
To copy to clipboard, switch view to plain text mode
Bookmarks