2010-02-05 11 views

risposta

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

Questo può essere fatto anche con i fogli di stile. Es .:

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

Set facendo setStylesheet(...)

Problemi correlati