1

I have a class that inherits QQuickPaintedItem with which I override paint() to draw an audio waveform.

Once the drawing is done I resize contentWidth of Flickable containing the qml element I create with qmlRegisterType.

The larger contentWidth the blurrier the content gets. I never draw depending on contentWidth either and paint() isn't called when changing contentWidth and the effect is the same when contentWidth is hardcodded in the qml file.

I'm not very experienced with Qt and I was wondering if it's the best approach to begin with for drawing a big waveform that I can scroll through, zoom in on and interact with and why the content of Flickable get blurrier when increasing contentWidth.

I tried all the obvious stuff such as setting the render hint to Antialiasing, etc.

ALDSMQJF
  • 19
  • 5
  • It's possible that this is a redrawing problem. I would recommend you use `QQuickItem` instead of `QQuickPaintedItem` since it's definitely faster. – folibis Jun 14 '18 at 10:36
  • I'm logging whenever update() is called or paint() for that matter. It's not redrawing as far as I can tell and the problem appears on the first paint(). I'll try using QQuickItem, thanks. – ALDSMQJF Jun 14 '18 at 11:38

0 Answers0