QPlainTextEdit font
-
What is the correct way to specify the font of a widget in WebAssembly?
I'm using QtCreator to build an application that includes the QPlainTextEdit widget. I'd like it to use a monospace font and I've tried specifying it in the Property Editor of the GUI builder. The font appears as expected when built as a desktop application, but not as a WebAssembly application (running in Firefox, FWIW).
I've tried different text edit widgets, setDefaultFont(), setDefaultStyleSheet(), QTextDocument settings, setThis(), setThat() and have burned HOURS trying to get this to look right.
In summary: Setting text edit widget font works in a desktop app, but not in a WASM app. What's the deal?
Thanks in advance.
-
Hi,
As an educated guess: embed the font using Qt's resource system and use QFontDatabase to load it in your application before using it.
-