1 pièce(s) jointe(s)
bug avec pyinstaller (bug styleSheet?)
Bonjour, j'ai remarqué un bug assez étrange:
Voici un code minimal:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| from PyQt5 import QtWidgets, QtCore, QtGui
import sys
app = QtWidgets.QApplication(sys.argv)
with open('test.css') as f:
app.setStyleSheet(f.read())
w = QtWidgets.QDialog()
c1 = QtWidgets.QComboBox()
c1.addItems(list('azertyuiop'))
c2 = QtWidgets.QComboBox()
c2.addItems(list('azertyuiop'))
layout = QtWidgets.QVBoxLayout(w)
layout.addWidget(c1)
layout.addWidget(c2)
w.show()
app.exec_() |
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| QComboBox {
color: deepskyblue;
selection-background-color: deepskyblue;
background-color: #f2fcff;
border: 1px solid #1e1e1e;
border-radius: 5;
font: 75 11pt "Tahoma";
width: 14em;
height: 1.3em;
}
QComboBox:hover {
border: 2px solid deepskyblue;
}
QComboBox:on {
padding-top: 3px;
padding-left: 4px;
background-color: #eeeeee;
}
QComboBox::drop-down {
subcontrol-origin: padding;
subcontrol-position: top right;
width: 15px;
border-left-width: 0px;
border-left-color: darkgray;
border-left-style: solid;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
QComboBox::down-arrow {
image: url(styleSheet/Sky/down_arrow.png);
}
QComboBox QAbstractItemView {
border: 2px solid darkgray;
color: deepskyblue;
background-color: #eeeeee;
selection-color: black;
selection-background-color: deepskyblue;
} |
Avec pyinstaller les items dans les combobox sont invisibles quand ils ont le focus ...
(avec tab c'est bien flagrant)
Une piste ?