Q_property connection in qml
Unsolved
QML and Qt Quick
-
I' am trying to intergrade qt progress bar in qml application and I can't able to map my signal in Q_Property.
void ProgressCircle::setMaximum(int maximum) { if(maximum < 0) maximum = 0; if(mMaximum != maximum) { mMaximum = maximum; update(); emit maximumChanged(maximum); if(mMaximum == 0) { mInfiniteAnimation.start(); } else { mInfiniteAnimation.stop(); } } }
and in .h file I'm trying to connect it using Q_PROPERTY, but i am not able to connect the signal
Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged) Q_PROPERTY(int maximum READ maximum WRITE setMaximum NOTIFY maximumChanged) Q_PROPERTY(qreal innerRadius READ innerRadius WRITE setInnerRadius) Q_PROPERTY(qreal outerRadius READ outerRadius WRITE setOuterRadius) Q_PROPERTY(QColor color READ color WRITE setColor)
-
@praveen_03 The code you have shared is correct. PErhapos it would be good to see the QML part, too ;-)