2010-02-05 10 views

답변

13
QListWidget t; 
t.addItem("first"); 
t.addItem("second"); 
t.item(0)->setForeground(Qt::red); 
t.item(1)->setForeground(Qt::blue); 
2

이 또한 스타일 시트로 수행 할 수 있습니다. setStylesheet(...)

에 의해 예컨대는 :

QListWidget::item { 
    color:#00ff00; 
    background-color:transparent; 
} 

설정을

관련 문제