Esempio n. 1
0
    def test_focusOutEvent(self, logger, launcher):
        # Remove keyboard focus from the logger
        launcher.app.sendEvent(logger,
                               QtGui.QFocusEvent(QtCore.QEvent.FocusOut))

        # Check the logger configuration
        assert logger.lineWidth() == logger.frame_style['lwidth']
        assert logger.frameShape() == logger.frame_style['shape']
        assert logger.frameShadow() == logger.frame_style['shadow']
Esempio n. 2
0
    def test_focusInEvent(self, launcher, logger):
        # Give keyboard focus to the logger
        # Notice that logger.setFocus() doesn't work if the widget is hidden
        launcher.app.sendEvent(logger,
                               QtGui.QFocusEvent(QtCore.QEvent.FocusIn))
        # QTest.mouseClick(logger, QtCore.Qt.LeftButton)

        # Check the logger configuration
        assert logger.lineWidth() == 2
        assert logger.frameShape() == QtWidgets.QFrame.Panel
        assert logger.frameShadow() == QtWidgets.QFrame.Plain