mborgerson / pyside6_qtads

Python bindings to Qt Advanced Docking System for PySide6
Other
22 stars 9 forks source link

Workaround for QTBUG-125149: Misplaced popup menu for reparented combo box #35

Closed mliberty1 closed 1 month ago

mliberty1 commented 3 months ago

Have you noticed that the dropbox for QComboBox has not been working correctly in your applications recently? Well, see QTBUG-125149. As indicated in the comments, QTBUG-122747 introduced this behavior in 6.7.0. Here is our equivalent issue #280 for the Joulescope UI.

I am working to help identify the problem and get a fix upstreamed in Qt, but this will take some time.

In the meantime, I need to release a "patched" version of the Joulescope UI. I would rather not revert all the way back to Qt ADS 4.2.1 to get PySide6 6.6.2 support. ADS 4.3.0 looks to have some good fixes (QT ADS releases).

To create a "patched" pyside6_qtads, I forked pyside6_qtads, and then modified line 15 of .github/workflows/main.yml to be:

        run: echo "rel0=6.6.3.1" >> $GITHUB_OUTPUT  # Force PySide6 version

Instead of running ./scripts/get-recent-releases.py to get the most recent PySide6 release, this pins it to 6.6.3.1 from Apr 2, 2024. The Joulescope UI seems to work well so far with this build and PySide6 6.6.3.1.

Questions:

  1. Is this the best way to pin a PySide6 dependency in a fork?
  2. Anything obvious that I am missing that should not work with this approach?
mborgerson commented 3 months ago

@mliberty1

Have you noticed that the dropbox for QComboBox has not been working correctly in your applications recently?

I did not notice! Thanks for pointing it out. I usually use Fusion theme in my application, which appears to be unaffected. I did just manage to reproduce the issue on Windows when switching to native controls.

Is this the best way to pin a PySide6 dependency in a fork?

This is probably the easiest solution :) And you can easily push your package variation to PyPI with the workflow.

Ideally PySide6-QtAds would not have such a strict dependency on PySide6 version and could work with a range of versions of PySide6, that way the requirement could just live in your application's setup, but I had issues with binary compatibility across PySide6 versions.

If you come up with a solution that works well I'm happy to consider it for merge, otherwise going with the forked 6.6.2-only version temporarily is probably easiest for the time being for your application.

mliberty1 commented 1 month ago

Qt released 6.7.3 today, which fixes this issue. See PySide6 6.7.3.

@mborgerson Can you build a new PySide6-QtAds version (4.3.0.3?) so that the official PyPI release picks up this fix?

mliberty1 commented 1 month ago

It also looks like Qt-Advanced-Docking-System 4.3.1 fixes a few issues. If it is easy to pick up these fixes at the same time, it is worth jumping to version 4.3.1.0.

lexnicolaes commented 1 month ago

Would be appreciated if Qt 6.7.3 could be integrated, I'm also quite impacted by QTBUG-125149.

mborgerson commented 1 month ago

@lexnicolaes I'll push an update tomorrow

mborgerson commented 1 month ago

@mliberty1 @lexnicolaes New update pushed. Can you confirm issue is resolved via PySide6-QtAds 4.3.0.3 with PySide6 6.7.3?

mborgerson commented 1 month ago

It also looks like Qt-Advanced-Docking-System 4.3.1 fixes a few issues

@mliberty1 Sync to 4.3.1 in https://github.com/mborgerson/pyside6_qtads/pull/37

mliberty1 commented 1 month ago

I confirm that this issue is now fixed while using 4.3.0.3 and 4.3.1. It is actually fixed by PySide6 6.7.3, which is now used by these releases.

I tested ADS features in my Joulescope UI app, and I did not notice any regressions with 4.3.1.

Thanks @mborgerson !

lexnicolaes commented 4 weeks ago

I can as well confirm that version 4.3.1 together with PySide6 6.7.3 fixes the issue.

Thank you @mborgerson for you work.