What I have noticed is that drawText(..) for the first time is slow. After that it is very fast. As work-around, you can try like follows. Add one dummy method drawMe() like this. Call this method once before you call show() method. So now drawText(..) inside paintEvent(..) will be fast. It hardly takes anytime. So performance issue is only at startup. After that it is nothing/negligible.
@SGaist Thank you, but this is actually the class where I am creating the tables when database is empty and holding all the models and necessary functions to work on them. So it is fine in this case :)
Thanks for the input! I think I'm going to go with QGraphicsView for the notation and use QQuickWidgets throughout the other pieces of the UI that don't need access to the entire model. I'm hoping that won't be too complicated and will give me the best of both worlds. But I do wonder: is there a specific piece of Qt Quick that's supposed to a "replacement" for QGraphicsView? It seems like the scene graph is a bit too low level, but it's also the only way to gain a lot of control and keep things mostly on the C++ side. It would be nice if the built-in QML elements are exposed via a C++ API at some point.