| Summary: | Mouse hover effects not working with QML-applications using QtQuickControls 2 Styles | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-qqc2-desktop-style | Reporter: | lay3rloves |
| Component: | general | Assignee: | Marco Martin <notmart> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | kde, nate |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Manjaro | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Super simple test program to reproduce the issue | ||
I am unsure whether or not this is a kwin related bug. That's wrong component (and product). :-) You probably forgot to set hoverEnabled. (In reply to Vlad Zagorodniy from comment #2) > That's wrong component (and product). :-) > > You probably forgot to set hoverEnabled. As I stated in the report it is not the code. It works as it is supposed to under all other DEs as I described. If kwin is not to blame what is? I have tested this issue under gnome, i3 and xfce and no problems but only under KDE it doesn't work. (In reply to Vlad Zagorodniy from comment #2) > That's wrong component (and product). :-) > > You probably forgot to set hoverEnabled. I actually tried to set the hoverEnabled parameter and it works as supposed to. Now I am wondering why on all other DEs it works without setting that. I guess someone should be notified about that but I have no idea who. (In reply to Vlad Zagorodniy from comment #2) > That's wrong component (and product). :-) > > You probably forgot to set hoverEnabled. We should probably set this automatically in the QQC2 desktop style. (In reply to Nate Graham from comment #5) > (In reply to Vlad Zagorodniy from comment #2) > > That's wrong component (and product). :-) > > > > You probably forgot to set hoverEnabled. > > We should probably set this automatically in the QQC2 desktop style. Then the functionality would be the same as in other DEs and Windows. >The mouse hover effects are part of the QtQuickControls 2 Style.
Which theme? How are you setting it?
(In reply to David Edmundson from comment #7) > >The mouse hover effects are part of the QtQuickControls 2 Style. > > Which theme? How are you setting it? I have tested that the hover effects are at least part of Material and Universal styles. As you can see from the attached test program that I am setting the style in main.cpp using "QQuickStyle::setStyle("Material");". We now set hoverEnabled to true for all the repevant components in the qqc2 desktop style. |
Created attachment 116084 [details] Super simple test program to reproduce the issue SUMMARY When running QML-based applications that utilize QtQuickControls 2 with styles (e.g. material) mouse hover effects don't work at all for any controls. For example hovering over a button or text input field doesn't highlight them. STEPS TO REPRODUCE 1. Build the attached test project. (I am using QtCreator with qmake for building and running) 2. Run it. 3. Hover your mouse over the button on the center of the application. OBSERVED RESULT Nothing happens. EXPECTED RESULT The button highlights to inform the user that the mouse is now on top of the button. SOFTWARE VERSIONS (available in About System) KDE Plasma Version: 5.14.2 KDE Frameworks Version: 5.51.0 Qt Version: 5.11.2 ADDITIONAL INFORMATION The mouse hover effects are part of the QtQuickControls 2 Style. For example the material style and universal style provide these hover effects. This issue does not happen on RHEL using gnome-classic or Arch using i3. This issue also happens on KDE Neon. On Manjaro XFCE I experienced the same issue but it was due to Manjaro setting an environment variable QT_QPA_PLATFORMTHEME="qt5ct". Removing that solved the issue but KDE version of Manjaro doesn't have that environment variable set and the issue is present.