slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.58k stars 604 forks source link

TabWidget: Tab hover event not working when using Qt backend #4974

Open notfirefox opened 7 months ago

notfirefox commented 7 months ago

Steps to reproduce The issue can be reproduced on Linux using the example gallery application.

  1. git clone https://github.com/slint-ui/slint
  2. cd examples/gallery
  3. cargo run

Expected behavior When hovering over the tab, it gets highlighted as shown in this screenshot.

image (Screenshot shows the highlighted tab as seen in KeePassXC)

Actual behavior No highlighting is shown as shown in this screenshot.

image (Screenshot shows the non highlighted tab as seen in the example gallery application)

Platform Fedora Linux 40, Rust, Qt Backend, Wayland

notfirefox commented 7 months ago

On a related note: It would be nice if one could scroll through the tabs using the scroll wheel, when the TabWidget is focused. This seems to be the general behavior, i.e. how it works in other Qt apps as well and as I'd expect it to work.

Issue: https://github.com/slint-ui/slint/issues/5002

notfirefox commented 7 months ago

Another enhancement request: Do not show the focus indicator when clicking on the tab.

image

Qt seems to show this when the tab gets focused through a keyboard focus change.