Important: Please read the Qt Code of Conduct -

Mouseover vs Mouseclick

  • Hi,

    I have developed a Qt application in Qt5.9 that I embed inside an Adobe Illustrator plugin. This plugin is a floating panel.

    When the focus is not on the plugin panel, and I move the mouse over the panel, my Qt button css hover style plays out (which means Qt receives the mouse hover). But if I click it, then click event doesn't execute. It takes 2 clicks for me to fire the event ( 1st click gets the panel into focus, 2nd click fires the event).

    Why is this even happening that Qt receives one event and not the other?
    I want to avoid this. Either the mouse hover shouldn't work when the window is out of focus, or I should be able to click the button at first go.

    Any ideas?

  • Lifetime Qt Champion

    @poortipant said in Mouseover vs Mouseclick:

    window is out of focus

    Do you mean the whole Adobe Illustrator window is not the active one? If so then you have to make it active first in any case. That would explain the behaviour, but I'm not sure what exactly you mean.

  • @jsulm
    No, the whole scenario is within Illustrator.
    For eg, if I open a swatch and then move the mouse over my panel as seen in the image below.


    Here, the focus is in the Swatch panel. But, when I move the mouse over the button, it gets the event.

Log in to reply