April 6, 2012

DanqueDynasty DanqueDynasty
Lab Rat
9 posts

How to change the font size in the QTextEdit from the QComboBox

 

Ive been stumped on a problem for quite some time now, and so I gotta ask, how can I get the font in the QTextEdit to be sized based on the value in the QComboBox. Please help, I have been stuck on this problem for some time. thanks

2 replies

April 6, 2012

joonhwan joonhwan
Lab Rat
94 posts

maybe you can use QWidget::setStyleSheet(const QString&) function.
see here [qt-project.org] for reference

 Signature 

joonhwan at gmail dot com

April 6, 2012

Lykurg Lykurg
Lab Rat
13 posts

Connect the currentIndexChanged signal from the box to a slot where you set the font of the editor using QWidget::setFont().

 
  ‹‹ How to create persistent QRubberbands on QGraphicsView widget      How to get the actual width of the QGraphicsScene ››

You must log in to post a reply. Not a member yet? Register here!