QGraphicsEllipseItem does not hide unless click on a screen
-
Hi,
I'm running into a strange issue using QGraphicsEllipseItem. I created a thread which shows and hides QGraphicsEllipseItem in a QGraphicsRectItem. In the code I try to hide and show the Ellipse in the rect. It always seems to show but when I try to hide, some do hide but the others do not until I click on the scene, then all of a sudden they all hide as I would expect. Is there some sort of refresh I can do or force a hide other than call QGraphicsEllipseItem->hide()?
Another question, is there a way a I can send the QGraphicsScene to a thread using signal/slot. I tried as I do with any other attribute, i.e. bool, QList<int>, etc but for some reason <QGraphicsScene *> doe not get passed properly even if I use something like
qRegisterMetaType<QGraphicsScene *>("QGraphicsScene *");Thanks
-
@leinad said in QGraphicsEllipseItem does not hide unless click on a screen:
I created a thread which shows and hides QGraphicsEllipseItem in a QGraphicsRectItem
Another question, is there a way a I can send the QGraphicsScene to a thread using signal/slot
You cannot (must not) access Qt UI objects from another thread.