Hello,
I'm currently trying to port a widget created in Qt4 to Qt5. The widget is using third party libraries that require a handle to a x11 drawable surface, in Qt4 it was done by the widget being a subclass to QLabel and by letting it have a QPixmap::Handle(). In Qt5 this function has been removed from QPixmap and I have been trying to find a way around this.
The only solution that I have found is to take the QWidget::winId() from the widget itself and use that as the required handle.
That works and as long as I use setAttribute( Qt::WA_PaintOnScreen, true ) on the widget, but after I do that every change in the drawing is always one step behind what it's actually supposed to be showing and it doesn't update until I redraw it the next time.
Is there some difference between using the old QPixmap::Handle() from QWidget::winId() that could cause the delayed drawing?
It seems like if I don't use setAttribute( Qt::WA_PaintOnScreen, true ), then it fights with Qt for drawing to that surface but then it is not delayed anymore. Is there something else I should do after setting this attribute to make it update correctly?
I would greatly appreciate any help I could get with this.
Bookmarks