QButton, welcher Stil?

Python und das Qt-Toolkit, erstellen von GUIs mittels des Qt-Designers.
Antworten
Alfons Mittelmeyer
User
Beiträge: 1715
Registriert: Freitag 31. Juli 2015, 13:34

Hier hatte ich gesehen, der QButton hätte folgenden Stil:

Code: Alles auswählen

QPushButton {
    border: 2px solid #8f8f91;
    border-radius: 6px;
    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                      stop: 0 #f6f7fa, stop: 1 #dadbde);
    min-width: 80px;
}

QPushButton:pressed {
    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                      stop: 0 #dadbde, stop: 1 #f6f7fa);
}

QPushButton:flat {
    border: none; /* no border for a flat push button */
}

QPushButton:default {
    border-color: navy; /* make the default button prominent */
}
Quelle: http://doc.qt.io/qt-5/stylesheet-exampl ... pushbutton

Aber das mit border und dunkler, fast schwarzer Umrandung stimmt nicht. Wie wäre dann bitte der richtige Stil?
Antworten