File: faq.md

package info (click to toggle)
superqt 0.7.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,320 kB
  • sloc: python: 9,108; makefile: 16; sh: 12
file content (26 lines) | stat: -rw-r--r-- 1,232 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# FAQ

## Sliders not dragging properly on MacOS 12+

??? details
    On MacOS Monterey, with Qt5, there is a bug that causes all sliders
    (including native Qt sliders) to not respond properly to drag events.  See:

    - [https://bugreports.qt.io/browse/QTBUG-98093](https://bugreports.qt.io/browse/QTBUG-98093)
    - [https://github.com/pyapp-kit/superqt/issues/74](https://github.com/pyapp-kit/superqt/issues/74)

    Superqt includes a workaround for this issue, but it is not perfect, and it requires using a custom stylesheet (which may interfere with your own styles).  Note that you
    may not see this issue if you're already using custom stylesheets.

    To opt in to the workaround, do any of the following:

    - set the environment variable `USE_MAC_SLIDER_PATCH=1` before importing superqt
    (note: this is safe to use even if you're targeting more than just MacOS 12, it will only be applied when needed)
    - call the `applyMacStylePatch()` method on any of the superqt slider subclasses (note, this will override your slider styles)
    - apply the stylesheet manually:

    ```python
    from superqt.sliders import MONTEREY_SLIDER_STYLES_FIX

    slider.setStyleSheet(MONTEREY_SLIDER_STYLES_FIX)
    ```