- Knowledge Base
- Developer
- Displays & Screens
Can I change the font size in the script editor?
Yes!
var _source = mywindow.findChild("_source");
var _existing = mywindow.findChild("_find");
var _layout = toolbox.widgetGetLayout(_existing);
var _fontSize = toolbox.createWidget("QSpinBox", mywindow, "_fontSize");
_fontSize.value = 10;
_layout.addWidget(_fontSize);
function sHandleFontSizeChange() {
_source.setFontPointSize(_fontSize.value);
}
_fontSize["valueChanged(int)"].connect(sHandleFontSizeChange);