Draw without paintevent
i have to draw a ellipse on button click .
i made a diffrent class for plotting and in this class i made a function plot an in this function i want to write the code for draw ellipse . when button will be clicked this function should be call.
Do you mean you want to draw an ellipse without paint() ?
What is your class derived from ?
Also to call a function from QML you need to register your class and make the function "Q_INVOKABLE":http://qt-project.org/doc/qt-5/qobject.html#Q_INVOKABLE