Skip to content

Conversation

@gitttt-1234
Copy link
Collaborator

Previously, on Windows, loading an .slp file would throw an error because the code iterated over all menu.children(), which on Windows includes a QGraphicsDropShadowEffect object. This object doesn’t have a .text() or .setChecked() method, leading to the crash.

[<function MainWindow._create_menus.<locals>.add_submenu_choices.<locals>.<lambda> at 0x00000187FF0BD440>, <function MainWindow._load_overlays.<locals>.overlay_state_connect.<locals>.<lambda> at 0x0000018783954FE0>, <bound method MainWindow.plotFrame of <sleap.gui.app.MainWindow(0x187f97e5660) at 0x00000187FED65280>>, <function MainWindow._load_overlays.<locals>.<lambda> at 0x00000187839551C0>, <function MainWindow._load_overlays.<locals>.<lambda> at 0x0000018783955260>, <function MainWindow._load_overlays.<locals>.overlay_state_connect.<locals>.<lambda> at 0x00000187FEEC8AE0>, <bound method MainWindow.plotFrame of <sleap.gui.app.MainWindow(0x187f97e5660) at 0x00000187FED65280>>, <function MainWindow._load_overlays.<locals>.<lambda> at 0x0000018783955580>, <function MainWindow._load_overlays.<locals>.<lambda> at 0x0000018783955760>]
'PySide6.QtWidgets.QGraphicsDropShadowEffect' object has no attribute 'text'
Error occurred during callback 0 for distinctly_color!

The fix updates the logic to only check action objects using menu.actions(), ensuring that only action items are processed.

@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.45%. Comparing base (5d9f04a) to head (0afdcb5).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2440      +/-   ##
===========================================
+ Coverage    59.43%   59.45%   +0.01%     
===========================================
  Files           68       68              
  Lines        13219    13219              
===========================================
+ Hits          7857     7859       +2     
+ Misses        5362     5360       -2     

☔ View full report in Codecov by Sentry.
📢 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.

@gitttt-1234 gitttt-1234 merged commit 1454e2e into develop Oct 24, 2025
8 checks passed
@gitttt-1234 gitttt-1234 deleted the divya/fix-qtwidget-bug-windows branch October 24, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants