Bonjour,

Je cherche à customiser un QPushButton via une styleSheet qui se présente comme ça:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
QPushButton {
    border: 1px solid rgb(0, 0, 0);
    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
    	stop: 0 rgb(99, 99, 99), stop: 1 rgb(0, 0, 0));
    color: rgb(255, 255, 255);
}
 
QPushButton:checked {
    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
    	stop: 0 rgb(255, 0, 0), stop: 1 rgb(106, 14, 14));
    font-weight: bold;
}
Dans l'état checked, la modification du background fonctionne bien mais pas la modification de la font (qui devrait passer en gras). Je n'ai pas beaucoup utilisé CSS donc je suis surement passé à coté de quelque chose.

merci d'avance.