[Solved]Paint issue in Widget
General and Desktop
4
Posts
2
Posters
1.7k
Views
1
Watching
-
I'm trying my hands on clock in Widget from the reference "digiclock example":http://doc.qt.digia.com/qt/demos-embedded-digiflip.html
we intended to improvise the project with other functionalities, so I begun with adding colon between the digits( for example 10:30), though am drawing the rectangle on the paint event. I'm not able see them on the screen.
Below is the code snippet, i have tried to introduce a plane rectangle on paint event but its not visible on the screen
@void DrawingDigits::paintEvent(QPaintEvent *event) {
Q_UNUSED(event);QPainter painter(this); painter.setPen(Qt::red); painter.drawRect(10,10,10,10); if (m_animator.state() == QTimeLine::Running) { paintFlip(); } else { paintStatic(); }
}@
Can anyone please let me know where am getting it wrong (Kindly refer the link for the complete code in case needed). I'm not getting any warning while debugging.