2010-02-05 15 views

Odpowiedz

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

Można to również zrobić za pomocą arkuszy stylów. Np .:

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

ustawić ją setStylesheet(...)

Powiązane problemy