FontMetrics in QWindow?
Unsolved
General and Desktop
-
Hi guys,
How can I get fontMetrics of a font in my QWindow that I am using for OpenGL?
I was using a command like this in QWidget:
fontMetrics().width(text());But this command does not work in QWindow. I even tried creating a widget inside a QWindow but I still was not able to use the command shown above.
Is there a way I can use the same command on QWindow? Or maybe another way to get similar results in QWindow?Thank you,
-
Hi,
What are you trying to achieve with that QWindow ?
-
You can also use the Graphics View framework with a QOpenGLWidget as backend.
-
It's described in the QGraphicsView details using QGLWidget, but it's the ancestor of QOpenGLWidget.