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

Odd code found for PyQt6: always raises an exception #469

Open
StSav012 opened this issue Nov 7, 2023 · 0 comments
Open

Odd code found for PyQt6: always raises an exception #469

StSav012 opened this issue Nov 7, 2023 · 0 comments
Labels
Milestone

Comments

@StSav012
Copy link
Contributor

StSav012 commented Nov 7, 2023

The following lines assume that in PyQt6.QtGui, there is a Qt object.

qtpy/qtpy/QtCore.py

Lines 49 to 55 in c046821

# For issue #311
# Seems like there is an error with sip. Without first
# trying to import `PyQt6.QtGui.Qt`, some functions like
# `PyQt6.QtCore.Qt.mightBeRichText` are missing.
if not TYPE_CHECKING:
with contextlib.suppress(ImportError):
from PyQt6.QtGui import Qt

However, in PyQt6 versions 6.2.4, 6.5.3, and 6.6.0, there is no attribute Qt in QtGui. The code seems to be placed there mistakenly.

The issue referenced in the comment is #313.

@dalthviz dalthviz added this to the v2.4.2 milestone Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants