-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# -*- coding: utf-8 -*- | ||
# ----------------------------------------------------------------------------- | ||
# Copyright © 2009- The Spyder Development Team | ||
# | ||
# Licensed under the terms of the MIT License | ||
# (see LICENSE.txt for details) | ||
|
||
from . import PYQT5, PYSIDE2, PythonQtError | ||
|
||
|
||
if PYQT5: | ||
from PyQt5.QtWinExtras import * | ||
elif PYSIDE2: | ||
from PySide2.QtWinExtras import * | ||
else: | ||
raise PythonQtError('No Qt bindings could be found') |
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,27 @@ | ||
from __future__ import absolute_import | ||
|
||
import sys | ||
|
||
import pytest | ||
from qtpy import PYQT5, PYSIDE2 | ||
|
||
|
||
@pytest.mark.skipif(sys.platform != "win32" or not (PYQT5 or PYSIDE2), | ||
reason="Only available in Qt5 bindings and Windows platform") | ||
def test_qtwinextras(): | ||
"""Test the qtpy.QtWinExtras namespace""" | ||
from qtpy import QtWinExtras | ||
assert QtWinExtras.QWinJumpList is not None | ||
assert QtWinExtras.QWinJumpListCategory is not None | ||
assert QtWinExtras.QWinJumpListItem is not None | ||
assert QtWinExtras.QWinTaskbarButton is not None | ||
assert QtWinExtras.QWinTaskbarProgress is not None | ||
assert QtWinExtras.QWinThumbnailToolBar is not None | ||
assert QtWinExtras.QWinThumbnailToolButton is not None | ||
assert QtWinExtras.QtWin is not None | ||
|
||
if PYSIDE2: | ||
assert QtWinExtras.QWinColorizationChangeEvent is not None | ||
assert QtWinExtras.QWinCompositionChangeEvent is not None | ||
assert QtWinExtras.QWinEvent is not None | ||
|