HI guys,
I have created QLabel on the QGraphicsView widget, but I can't set the font size. HEre is the code I am using, and it's not changing the font( I have a standardt (point 12) font);
m_textOCOG
= new QLabel(m_view
->viewport
());
m_textOCOG->setFont(font);
m_textOCOG->setText("COG: N A");
m_textOCOG->setGeometry(452,10,100,20);
m_textOCOG
->setFrameStyle
(QFrame::NoFrame);
m_textOCOG->show();
m_textOCOG = new QLabel(m_view->viewport());
QFont font("Helvetica", 20, QFont::Bold);
m_textOCOG->setFont(font);
m_textOCOG->setText("COG: N A");
m_textOCOG->setGeometry(452,10,100,20);
m_textOCOG->setFrameStyle(QFrame::NoFrame);
m_textOCOG->show();
To copy to clipboard, switch view to plain text mode
Any idea? Thank you beforehand.
Maverick
Bookmarks