Hello all, I have a rather weird problem.
I have a class started in QThread which sends via signals/slots to another class information for a QGraphicsItems which are then placed on the QGraphicsScene. The problem arises when I send too many of these items....sometimes some items simply don't get diplayed; it is completely random which ones don't get drawn on the scene...and it is always just a couple that don't get displayed...the majority 98% or so always do...
here is my code in the slot that catches the signal from the thread.
void myClass::getItem(...){
m_items.push_back(new itemOnScene(...));
m_mainScene->addItem(items.back());
m_items.back()->setPos(QPointF(0, 0));
m_items.back()->setVisible(true);//defualt is true anyways...just to make sure...
m_items.back()->update();//just to make sure...
}
if I add Sleep(10); after the update call all items are displayed 100% of the time...what's going on with QT? A signal being sent too close after a previous one gets lost? What's going on here? Does this have to do with how items are painted?
Thanks for your help in advance...a truly baffling problem...
Jonathan
Edit://even works all the time with Sleep(1);
Bookmarks