Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Incompatible with PySide6 6.7.0 #477

Closed
larsoner opened this issue Apr 9, 2024 · 3 comments
Closed

BUG: Incompatible with PySide6 6.7.0 #477

larsoner opened this issue Apr 9, 2024 · 3 comments

Comments

@larsoner
Copy link
Contributor

larsoner commented Apr 9, 2024

6.7.0 just released today, using this code:

from qtpy import API
from qtpy.QtWidgets import (
    QFileDialog,
    QApplication,
    QWidget,
)
assert API == "pyside6", f"{API=}"

QApplication([])


class A(QFileDialog):
    def __init__(self):
        super().__init__(None)

print(isinstance(QFileDialog(), QWidget))
print(isinstance(A(), QWidget))

on 6.6.3.1 I get the expected:

True
True

but on 6.7.0 I get:

False
False

and if I change the import at the top to be from PySide6.QtWidgets things are again fine, so something is broken with qtpy specifically.

@larsoner
Copy link
Contributor Author

larsoner commented Apr 9, 2024

Okay this is some very weird upstream bug, this code fails on 6.7.0:

from PySide6.QtGui import QActionGroup
from PySide6.QtWidgets import *

QApplication([])
assert isinstance(QFileDialog(), QWidget)

if you comment out the QActionGroup import or move it after the star import things are fine.

@ccordoba12
Copy link
Member

So, do you think this is an issue with qtpy or PySide6?

@larsoner
Copy link
Contributor Author

larsoner commented Apr 9, 2024

PySide6, I opened https://bugreports.qt.io/browse/PYSIDE-2674 upstream. I tried messing with the import order in qtpy to work around the issue but couldn't, so I'll close!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants