Skip to content

feat: deprecate applyMacStylePatch, which does nothing with Qt 6 - #370

Open
tlambert03 wants to merge 1 commit into
pyapp-kit:mainfrom
tlambert03:mac-patch-noop-qt6
Open

tlambert03 wants to merge 1 commit into
pyapp-kit:mainfrom
tlambert03:mac-patch-noop-qt6

Conversation

@tlambert03

Copy link
Copy Markdown
Member

applyMacStylePatch() (and MONTEREY_SLIDER_STYLES_FIX) work around QTBUG-98093: sliders not dragging properly on macOS 12+ (#74, #117). Qt fixed that in 6.2.3, and we require Qt >= 6.4 anyway ... so with Qt 6 the patch doesn't fix anything, it just restyles the slider. This makes applyMacStylePatch() a no-op on Qt 6, with a DeprecationWarning. Qt 5 is unchanged (the fix never made it into the open source 5.15 releases, as far as I can tell).

  • USE_MAC_SLIDER_PATCH is unchanged: it only ever applied to Qt 5 (and macOS 12+)
  • MONTEREY_SLIDER_STYLES_FIX stays, as a plain constant (napari-prism applies it directly)
  • the whole thing can go when we drop Qt 5

The main caller is magicgui, which applied it to every range slider on any Qt and OS: pyapp-kit/magicgui#752 limits that to Qt 5 on macOS 12+.

Qt fixed QTBUG-98093 (sliders on macOS 12+) in 6.2.3, so with Qt 6 the
style sheet workaround only restyles the slider: applyMacStylePatch() now
does nothing there, with a DeprecationWarning. Qt 5 is unchanged, as are
USE_MAC_SLIDER_PATCH (which only ever applied to Qt 5) and
MONTEREY_SLIDER_STYLES_FIX.
@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.06%. Comparing base (51cb32e) to head (16a6922).

Files with missing lines Patch % Lines
src/superqt/sliders/_generic_slider.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #370      +/-   ##
==========================================
+ Coverage   85.05%   85.06%   +0.01%     
==========================================
  Files          49       49              
  Lines        3975     3985      +10     
==========================================
+ Hits         3381     3390       +9     
- Misses        594      595       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tlambert03
tlambert03 marked this pull request as ready for review November 14, 2026 08:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant