mirror of
https://github.com/pyapp-kit/superqt.git
synced 2025-12-16 03:00:05 +01:00
build: unpin pyside6 (#133)
* build: unpin pyside6 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -79,7 +79,7 @@ pyqt6 =
|
||||
pyside2 =
|
||||
pyside2
|
||||
pyside6 =
|
||||
pyside6<6.4.0
|
||||
pyside6
|
||||
quantity =
|
||||
pint
|
||||
testing =
|
||||
|
||||
@@ -356,10 +356,9 @@ class QFontIconStore(QObject):
|
||||
|
||||
def __init__(self, parent: Optional[QObject] = None) -> None:
|
||||
super().__init__(parent=parent)
|
||||
# QT6 drops this
|
||||
dpi = getattr(Qt.ApplicationAttribute, "AA_UseHighDpiPixmaps", None)
|
||||
if dpi:
|
||||
QApplication.setAttribute(dpi)
|
||||
if tuple(QT_VERSION.split(".")) < ("6", "0"):
|
||||
# QT6 drops this
|
||||
QApplication.setAttribute(Qt.ApplicationAttribute.AA_UseHighDpiPixmaps)
|
||||
|
||||
@classmethod
|
||||
def instance(cls) -> QFontIconStore:
|
||||
|
||||
@@ -18,7 +18,10 @@ def get_text_char_format(style):
|
||||
"""
|
||||
|
||||
text_char_format = QtGui.QTextCharFormat()
|
||||
text_char_format.setFontFamily("monospace")
|
||||
if hasattr(text_char_format, "setFontFamilies"):
|
||||
text_char_format.setFontFamilies(["monospace"])
|
||||
else:
|
||||
text_char_format.setFontFamily("monospace")
|
||||
if style.get("color"):
|
||||
text_char_format.setForeground(QtGui.QColor(f"#{style['color']}"))
|
||||
|
||||
|
||||
@@ -20,10 +20,11 @@ def _mouse_event(pos=QPointF(), type_=QEvent.Type.MouseMove):
|
||||
"""Create a mouse event of `type_` at `pos`."""
|
||||
return QMouseEvent(
|
||||
type_,
|
||||
QPointF(pos),
|
||||
Qt.MouseButton.LeftButton,
|
||||
Qt.MouseButton.LeftButton,
|
||||
Qt.KeyboardModifier.NoModifier,
|
||||
QPointF(pos), # localPos
|
||||
QPointF(), # windowPos / globalPos
|
||||
Qt.MouseButton.LeftButton, # button
|
||||
Qt.MouseButton.LeftButton, # buttons
|
||||
Qt.KeyboardModifier.NoModifier, # modifiers
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user