Python qtpy.QtCore.QEvent() Examples
The following are 23
code examples of qtpy.QtCore.QEvent().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
qtpy.QtCore
, or try the search function
.
Example #1
Source File: icon_browser.py From qtawesome with MIT License | 6 votes |
def resizeEvent(self, event): """ Re-implemented to re-calculate the grid size to provide scaling icons Parameters ---------- event : QtCore.QEvent """ width = self.viewport().width() - 30 # The minus 30 above ensures we don't end up with an item width that # can't be drawn the expected number of times across the view without # being wrapped. Without this, the view can flicker during resize tileWidth = width / VIEW_COLUMNS iconWidth = int(tileWidth * 0.8) self.setGridSize(QtCore.QSize(tileWidth, tileWidth)) self.setIconSize(QtCore.QSize(iconWidth, iconWidth)) return super().resizeEvent(event)
Example #2
Source File: test_main.py From P4VFX with MIT License | 5 votes |
def assert_pyside(): """ Make sure that we are using PySide """ import PySide assert QtCore.QEvent is PySide.QtCore.QEvent assert QtGui.QPainter is PySide.QtGui.QPainter assert QtWidgets.QWidget is PySide.QtGui.QWidget assert QtWebEngineWidgets.QWebEnginePage is PySide.QtWebKit.QWebPage
Example #3
Source File: test_main.py From qtpy with MIT License | 5 votes |
def assert_pyqt5(): """ Make sure that we are using PyQt5 """ import PyQt5 assert QtCore.QEvent is PyQt5.QtCore.QEvent assert QtGui.QPainter is PyQt5.QtGui.QPainter assert QtWidgets.QWidget is PyQt5.QtWidgets.QWidget if QtWebEngineWidgets.WEBENGINE: assert QtWebEngineWidgets.QWebEnginePage is PyQt5.QtWebEngineWidgets.QWebEnginePage else: assert QtWebEngineWidgets.QWebEnginePage is PyQt5.QtWebKitWidgets.QWebPage
Example #4
Source File: test_main.py From qtpy with MIT License | 5 votes |
def assert_pyqt4(): """ Make sure that we are using PyQt4 """ import PyQt4 assert QtCore.QEvent is PyQt4.QtCore.QEvent assert QtGui.QPainter is PyQt4.QtGui.QPainter assert QtWidgets.QWidget is PyQt4.QtGui.QWidget assert QtWebEngineWidgets.QWebEnginePage is PyQt4.QtWebKit.QWebPage
Example #5
Source File: test_main.py From qtpy with MIT License | 5 votes |
def assert_pyside2(): """ Make sure that we are using PySide """ import PySide2 assert QtCore.QEvent is PySide2.QtCore.QEvent assert QtGui.QPainter is PySide2.QtGui.QPainter assert QtWidgets.QWidget is PySide2.QtWidgets.QWidget assert QtWebEngineWidgets.QWebEnginePage is PySide2.QtWebEngineWidgets.QWebEnginePage
Example #6
Source File: test_main.py From qtpy with MIT License | 5 votes |
def assert_pyside(): """ Make sure that we are using PySide """ import PySide assert QtCore.QEvent is PySide.QtCore.QEvent assert QtGui.QPainter is PySide.QtGui.QPainter assert QtWidgets.QWidget is PySide.QtGui.QWidget assert QtWebEngineWidgets.QWebEnginePage is PySide.QtWebKit.QWebPage
Example #7
Source File: test_main.py From P4VFX with MIT License | 5 votes |
def assert_pyqt5(): """ Make sure that we are using PyQt5 """ import PyQt5 assert QtCore.QEvent is PyQt5.QtCore.QEvent assert QtGui.QPainter is PyQt5.QtGui.QPainter assert QtWidgets.QWidget is PyQt5.QtWidgets.QWidget if QtWebEngineWidgets.WEBENGINE: assert QtWebEngineWidgets.QWebEnginePage is PyQt5.QtWebEngineWidgets.QWebEnginePage else: assert QtWebEngineWidgets.QWebEnginePage is PyQt5.QtWebKitWidgets.QWebPage
Example #8
Source File: test_main.py From P4VFX with MIT License | 5 votes |
def assert_pyqt4(): """ Make sure that we are using PyQt4 """ import PyQt4 assert QtCore.QEvent is PyQt4.QtCore.QEvent assert QtGui.QPainter is PyQt4.QtGui.QPainter assert QtWidgets.QWidget is PyQt4.QtGui.QWidget assert QtWebEngineWidgets.QWebEnginePage is PyQt4.QtWebKit.QWebPage
Example #9
Source File: test_main.py From P4VFX with MIT License | 5 votes |
def assert_pyside(): """ Make sure that we are using PySide """ import PySide assert QtCore.QEvent is PySide.QtCore.QEvent assert QtGui.QPainter is PySide.QtGui.QPainter assert QtWidgets.QWidget is PySide.QtGui.QWidget assert QtWebEngineWidgets.QWebEnginePage is PySide.QtWebKit.QWebPage
Example #10
Source File: test_main.py From P4VFX with MIT License | 5 votes |
def assert_pyqt5(): """ Make sure that we are using PyQt5 """ import PyQt5 assert QtCore.QEvent is PyQt5.QtCore.QEvent assert QtGui.QPainter is PyQt5.QtGui.QPainter assert QtWidgets.QWidget is PyQt5.QtWidgets.QWidget if QtWebEngineWidgets.WEBENGINE: assert QtWebEngineWidgets.QWebEnginePage is PyQt5.QtWebEngineWidgets.QWebEnginePage else: assert QtWebEngineWidgets.QWebEnginePage is PyQt5.QtWebKitWidgets.QWebPage
Example #11
Source File: test_main.py From P4VFX with MIT License | 5 votes |
def assert_pyqt4(): """ Make sure that we are using PyQt4 """ import PyQt4 assert QtCore.QEvent is PyQt4.QtCore.QEvent assert QtGui.QPainter is PyQt4.QtGui.QPainter assert QtWidgets.QWidget is PyQt4.QtGui.QWidget assert QtWebEngineWidgets.QWebEnginePage is PyQt4.QtWebKit.QWebPage
Example #12
Source File: test_main.py From P4VFX with MIT License | 5 votes |
def assert_pyside2(): """ Make sure that we are using PySide """ import PySide2 assert QtCore.QEvent is PySide2.QtCore.QEvent assert QtGui.QPainter is PySide2.QtGui.QPainter assert QtWidgets.QWidget is PySide2.QtWidgets.QWidget assert QtWebEngineWidgets.QWebEnginePage is PySide2.QtWebEngineWidgets.QWebEnginePage
Example #13
Source File: test_main.py From vnpy_crypto with MIT License | 5 votes |
def assert_pyside(): """ Make sure that we are using PySide """ import PySide assert QtCore.QEvent is PySide.QtCore.QEvent assert QtGui.QPainter is PySide.QtGui.QPainter assert QtWidgets.QWidget is PySide.QtGui.QWidget assert QtWebEngineWidgets.QWebEnginePage is PySide.QtWebKit.QWebPage
Example #14
Source File: test_main.py From winpython with MIT License | 5 votes |
def assert_pyqt5(): """ Make sure that we are using PyQt5 """ import PyQt5 assert QtCore.QEvent is PyQt5.QtCore.QEvent assert QtGui.QPainter is PyQt5.QtGui.QPainter assert QtWidgets.QWidget is PyQt5.QtWidgets.QWidget if QtWebEngineWidgets.WEBENGINE: assert QtWebEngineWidgets.QWebEnginePage is PyQt5.QtWebEngineWidgets.QWebEnginePage else: assert QtWebEngineWidgets.QWebEnginePage is PyQt5.QtWebKitWidgets.QWebPage
Example #15
Source File: test_main.py From winpython with MIT License | 5 votes |
def assert_pyqt4(): """ Make sure that we are using PyQt4 """ import PyQt4 assert QtCore.QEvent is PyQt4.QtCore.QEvent assert QtGui.QPainter is PyQt4.QtGui.QPainter assert QtWidgets.QWidget is PyQt4.QtGui.QWidget assert QtWebEngineWidgets.QWebEnginePage is PyQt4.QtWebKit.QWebPage
Example #16
Source File: test_main.py From winpython with MIT License | 5 votes |
def assert_pyside2(): """ Make sure that we are using PySide """ import PySide2 assert QtCore.QEvent is PySide2.QtCore.QEvent assert QtGui.QPainter is PySide2.QtGui.QPainter assert QtWidgets.QWidget is PySide2.QtWidgets.QWidget assert QtWebEngineWidgets.QWebEnginePage is PySide2.QtWebEngineWidgets.QWebEnginePage
Example #17
Source File: test_main.py From winpython with MIT License | 5 votes |
def assert_pyside(): """ Make sure that we are using PySide """ import PySide assert QtCore.QEvent is PySide.QtCore.QEvent assert QtGui.QPainter is PySide.QtGui.QPainter assert QtWidgets.QWidget is PySide.QtGui.QWidget assert QtWebEngineWidgets.QWebEnginePage is PySide.QtWebKit.QWebPage
Example #18
Source File: qt_plugin_sorter.py From napari with BSD 3-Clause "New" or "Revised" License | 5 votes |
def dropEvent(self, event: QEvent): """Triggered when the user moves & drops one of the items in the list. Parameters ---------- event : QEvent The event that triggered the dropEvent. """ super().dropEvent(event) order = [self.item(r).hook_implementation for r in range(self.count())] self.order_changed.emit(order)
Example #19
Source File: qt_color_dialog.py From napari with BSD 3-Clause "New" or "Revised" License | 5 votes |
def keyPressEvent(self, event: QEvent): event.ignore()
Example #20
Source File: qt_color_dialog.py From napari with BSD 3-Clause "New" or "Revised" License | 5 votes |
def mouseReleaseEvent(self, event: QEvent): """Show QColorPopup picker when the user clicks on the swatch.""" if event.button() == Qt.LeftButton: initial = QColor(*(255 * self._color).astype('int')) popup = QColorPopup(self, initial) popup.colorSelected.connect(self.setColor) popup.show_right_of_mouse()
Example #21
Source File: test_main.py From vnpy_crypto with MIT License | 5 votes |
def assert_pyqt5(): """ Make sure that we are using PyQt5 """ import PyQt5 assert QtCore.QEvent is PyQt5.QtCore.QEvent assert QtGui.QPainter is PyQt5.QtGui.QPainter assert QtWidgets.QWidget is PyQt5.QtWidgets.QWidget if QtWebEngineWidgets.WEBENGINE: assert QtWebEngineWidgets.QWebEnginePage is PyQt5.QtWebEngineWidgets.QWebEnginePage else: assert QtWebEngineWidgets.QWebEnginePage is PyQt5.QtWebKitWidgets.QWebPage
Example #22
Source File: test_main.py From vnpy_crypto with MIT License | 5 votes |
def assert_pyqt4(): """ Make sure that we are using PyQt4 """ import PyQt4 assert QtCore.QEvent is PyQt4.QtCore.QEvent assert QtGui.QPainter is PyQt4.QtGui.QPainter assert QtWidgets.QWidget is PyQt4.QtGui.QWidget assert QtWebEngineWidgets.QWebEnginePage is PyQt4.QtWebKit.QWebPage
Example #23
Source File: test_main.py From vnpy_crypto with MIT License | 5 votes |
def assert_pyside2(): """ Make sure that we are using PySide """ import PySide2 assert QtCore.QEvent is PySide2.QtCore.QEvent assert QtGui.QPainter is PySide2.QtGui.QPainter assert QtWidgets.QWidget is PySide2.QtWidgets.QWidget assert QtWebEngineWidgets.QWebEnginePage is PySide2.QtWebEngineWidgets.QWebEnginePage