Synchronize an QOpengl line with audio file
-
@HW-Developer
so the redline default offset is 320+160.
so if you add to that, it will move the redline.
Do you mean to hook up the slider so it moves the redline or what is task? -
@HW-Developer
ok.
so now you want a method in QOpenglWidget that also moves the redLine ? -
@HW-Developer
Ok, i assumed you subclassed it ?
like
class MyGLWidget : public QOpenGLWidget ...so you can just add a new method to it to alter the redLine variable.
-
@HW-Developer
ok but you question was
" how to create positionchanged method in my QOpenglWidget class,"
so i must be missing something you ask about ?
(if you already did make such method) -
hi
well you can hook up the AUDIO positionchanged
signal to your own method (slot)
using connect.
http://doc.qt.io//qt-5/signalsandslots.htmlso it will directly call your method when it changes.