Unsolved QLabel.setText() Vs. QPainter.drawText()
-
hi-
I would like to draw dynamic labels on GL Widget (every frame the text is changing).
is there a difference between QLabel.setText() and QPainter.drawText()?
what's more efficient?
note that:- the setting of these labels is done through paintGL() override function
- if i'll use QLabel- i can initialize labels on Init() func (called only once), so maybe its more efficient using QLabel??
thanks!
-
Hi
if you check QLables paintevent here
https://code.woboq.org/qt5/qtbase/src/widgets/widgets/qlabel.cpp.html
You can see its pretty huge.
so my guess would be qpainter drawText is faster, solely due to much less instruction pr frame to process. -
@mrjj I understand, tnx!