-
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #475 from nucleic/qt6-support
Qt6 support
- Loading branch information
Showing
24 changed files
with
194 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#------------------------------------------------------------------------------ | ||
# Copyright (c) 2022, Nucleic Development Team. | ||
# | ||
# Distributed under the terms of the Modified BSD License. | ||
# | ||
# The full license is in the file LICENSE, distributed with this software. | ||
#------------------------------------------------------------------------------ | ||
from . import QT_API, PYQT5_API, PYQT6_API | ||
|
||
if QT_API in PYQT6_API: | ||
from PyQt6.Qsci import * | ||
elif QT_API in PYQT5_API: | ||
from PyQt5.Qsci import * | ||
else: | ||
msg = 'the Qt Scintilla widget is only available when using PyQt5 or PyQt6' | ||
raise ImportError(msg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
#------------------------------------------------------------------------------ | ||
# Copyright (c) 2013-2020, Nucleic Development Team. | ||
# ------------------------------------------------------------------------------ | ||
# Copyright (c) 2013-2022, Nucleic Development Team. | ||
# | ||
# Distributed under the terms of the Modified BSD License. | ||
# | ||
# The full license is in the file LICENSE, distributed with this software. | ||
#------------------------------------------------------------------------------ | ||
from qtpy import API as QT_API, PYQT5_API, PYSIDE2_API, QT_VERSION | ||
# ------------------------------------------------------------------------------ | ||
from qtpy import ( | ||
API as QT_API, | ||
PYQT5_API, | ||
PYSIDE2_API, | ||
PYQT6_API, | ||
PYSIDE6_API, | ||
QT_VERSION, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# ------------------------------------------------------------------------------ | ||
# Copyright (c) 2022, Nucleic Development Team. | ||
# | ||
# Distributed under the terms of the Modified BSD License. | ||
# | ||
# The full license is in the file LICENSE, distributed with this software. | ||
# ------------------------------------------------------------------------------ | ||
from qtpy.QtCore import QEvent | ||
|
||
from . import QT_API, PYQT6_API, QT_VERSION | ||
|
||
def coerce_to_qevent_type(event_value): | ||
if QT_API in PYQT6_API: | ||
return event_value | ||
return QEvent.Type(event_value) | ||
|
||
|
||
def global_pos_from_event(event): | ||
if QT_VERSION[0] == "6": | ||
return event.globalPosition().toPoint() | ||
else: | ||
return event.globalPos() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.