Beispiel #1
0
    def __init__(self, parent):
        super().__init__(parent)
        self._notifs = []

        self.setWindowFlags(QtCore.Qt.FramelessWindowHint |
                            QtCore.Qt.WindowDoesNotAcceptFocus |
                            QtCore.Qt.SubWindow)
        # QtCore.Qt.Tool)
        # QtCore.Qt.WindowStaysOnTopHint)
        self.setAttribute(QtCore.Qt.WA_ShowWithoutActivating)  # | QtCore.Qt.WA_TranslucentBackground)

        self._layout = QtWidgets.QVBoxLayout()

        self._timer = QtCore.QTimer()
        self._timer.setInterval(1000)
        self._timer.timeout.connect(self._refreshSlot)
        self._timer.start()

        for i in range(0, MAX_ELEMENTS):
            l = QtWidgets.QLabel()
            l.setAlignment(QtCore.Qt.AlignTop)
            l.setWordWrap(True)
            l.hide()
            self._layout.addWidget(l)
        self.setLayout(self._layout)
Beispiel #2
0
        def __init__(self):
            super().__init__()
            l1 = QtWidgets.QLabel()
            l1.setText("Hello World")

            vbox = QtWidgets.QVBoxLayout()
            vbox.addWidget(l1)
            self.setLayout(vbox)
            self.setStyleSheet("background-color:blue;")
            self._dialog = NotifDialog(self)
            log.addHandler(NotifDialogHandler(self._dialog))
            log.info("test")
Beispiel #3
0
    def _addMisingVariablesEdits(self):
        missing = [
            v for v in self._variables if v.get("value", "").strip() == ""
        ]
        for i, variable in enumerate(missing, start=0):
            nameLabel = QtWidgets.QLabel()
            nameLabel.setText(variable.get("name", ""))
            self.gridLayout.addWidget(nameLabel, i, 0)

            valueEdit = QtWidgets.QLineEdit()
            valueEdit.setText(variable.get("value", ""))
            valueEdit.textChanged.connect(
                qpartial(self.onValueChange, variable))
            self.gridLayout.addWidget(valueEdit, i, 1)