Important: Please read the Qt Code of Conduct -

When QGraphicsScene meets a QWidget

  • Hi Qt Community,

    Casting aside the probability that the answer i'm looking for might be obvious ...

    I have a subclassed QGraphicsScene that contains a QGraphicsView with enabled mouse tracking ,a mouveMoveEvent and a (pixmap'ed') QLabel which center position follows the mouse.

    The (common) issue is that scene can't track the mouse when it's on my QLabel .

    How can I modify my (pixmap'ed) QLabel to make the scene ignore its existence or something ?

  • Lifetime Qt Champion

    Did you try with setAttribute(Qt::WA_TransparentForMouseEvents) on the label?

  • @mrjj

    Thank you very much :)


Log in to reply