Originally Posted by
bpetty
I did that because showServiceStatus() will draw two circles... kind of like a stop sign. One QPainter object draws the "Go" light, the other draw the "Stop" light.
I created two objects because I feel it is cleaner from a software engineering point of view, but since I am very new to Qt... if you see something wrong with that please let me know.
Treat a QPainter object as a sheet of paper. You don't need two sheets of paper to draw two circles. You can draw one circle and then the other (on the same sheet). You made two sheets and you want to put then in the same place. I guess you won't see two circles this way...
As for my real problem... I still don't know what to do. I checked to make sure my other machine had all of the DLLs the exe was linked against. If I figure it out I'll let you all... incase anyone has a simular problem
Try using a single QPainter. Using two painters might be the cause of your problems.
painter.setBrush(Qt::red);
painter.drawEllipse(20, 20, 50, 50);
painter.setBrush(Qt::blue);
painter.drawEllipse(100, 100, 50, 50);
}
void MainForm::paintEvent(QPaintEvent *){
QPainter painter(this);
painter.setBrush(Qt::red);
painter.drawEllipse(20, 20, 50, 50);
painter.setBrush(Qt::blue);
painter.drawEllipse(100, 100, 50, 50);
}
To copy to clipboard, switch view to plain text mode
Bookmarks