mirror of
https://github.com/pyapp-kit/superqt.git
synced 2026-01-05 03:40:47 +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 =
|
||||||
pyside2
|
pyside2
|
||||||
pyside6 =
|
pyside6 =
|
||||||
pyside6<6.4.0
|
pyside6
|
||||||
quantity =
|
quantity =
|
||||||
pint
|
pint
|
||||||
testing =
|
testing =
|
||||||
|
|||||||
@@ -356,10 +356,9 @@ class QFontIconStore(QObject):
|
|||||||
|
|
||||||
def __init__(self, parent: Optional[QObject] = None) -> None:
|
def __init__(self, parent: Optional[QObject] = None) -> None:
|
||||||
super().__init__(parent=parent)
|
super().__init__(parent=parent)
|
||||||
# QT6 drops this
|
if tuple(QT_VERSION.split(".")) < ("6", "0"):
|
||||||
dpi = getattr(Qt.ApplicationAttribute, "AA_UseHighDpiPixmaps", None)
|
# QT6 drops this
|
||||||
if dpi:
|
QApplication.setAttribute(Qt.ApplicationAttribute.AA_UseHighDpiPixmaps)
|
||||||
QApplication.setAttribute(dpi)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def instance(cls) -> QFontIconStore:
|
def instance(cls) -> QFontIconStore:
|
||||||
|
|||||||
@@ -18,7 +18,10 @@ def get_text_char_format(style):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
text_char_format = QtGui.QTextCharFormat()
|
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"):
|
if style.get("color"):
|
||||||
text_char_format.setForeground(QtGui.QColor(f"#{style['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`."""
|
"""Create a mouse event of `type_` at `pos`."""
|
||||||
return QMouseEvent(
|
return QMouseEvent(
|
||||||
type_,
|
type_,
|
||||||
QPointF(pos),
|
QPointF(pos), # localPos
|
||||||
Qt.MouseButton.LeftButton,
|
QPointF(), # windowPos / globalPos
|
||||||
Qt.MouseButton.LeftButton,
|
Qt.MouseButton.LeftButton, # button
|
||||||
Qt.KeyboardModifier.NoModifier,
|
Qt.MouseButton.LeftButton, # buttons
|
||||||
|
Qt.KeyboardModifier.NoModifier, # modifiers
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user