[Qt-interest] repaint not working
Malyushytsky, Alex
alex at wai.com
Wed Jun 1 05:28:22 CEST 2011
Minimum compilable example may help to find a problem.
At least without seen all the code I am only able to tell that neither update or repaint should not be required,
cause update should be scheduled ( and executed as soon event loop gets to it ) by
setUpdatesEnabled(true);
Alex
From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of Doug Stewart
Sent: Tuesday, May 31, 2011 6:35 AM
To: Qt Interest
Subject: [Qt-interest] repaint not working
We have a project that 3 people are working on. The repaint works in the Mac. the same code compiled on Ubuntu does not work.
{
connect(this, SIGNAL(pointChanged()), this, SLOT(repaint()));
}
...
qDebug() << "I'm trying to paint 0000000000000";
if ( newPoint != oldPoint ) {
m_input_map->getSet(m_held_set)->setPoint(m_sets_point, newPoint);
setUpdatesEnabled(true);
// emit pointChanged();
// emit repaint();
QWidget::repaint() ;
qDebug() << "I'm trying to paint";
}
qDebug() << "Set:" << m_held_set << " Point:" << m_sets_point;
qDebug() << "At:" << event->pos();
As you can see I have been trying different thing to see if I can get it to work.
This code is executed as the debug messages are see.
The changes that the code makes the the view are there, as they can be seen by forcing a system repaint by moving a different window over this one and then moving it away.
When the window is thus redisplayed the changes that were expected are there.
So --- why on Ubuntu it won't repaint? As I said it works on a Mac.
Doug
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110531/637c08ad/attachment.html
More information about the Qt-interest-old
mailing list