Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGraphicsEllipseItem does not hide unless click on a screen

QGraphicsEllipseItem does not hide unless click on a screen

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 221 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    leinad
    wrote on last edited by
    #1

    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

    JonBJ 1 Reply Last reply
    0
    • L leinad

      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

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @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.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved