myStringList2 <<"test";
QIcon testItemIcon
(":/images/undo.png");
foreach
(QString str2, myStringList2
){ customerList->addItem(testItem);
gradient.
setColorAt(0,
QColor::fromRgbF(210,
239,
109,
0));
gradient.
setColorAt(1,
QColor::fromRgbF(0,
1,
0,
0));
testItem->setBackground(brush);
}
QStringList myStringList2;
myStringList2 <<"test";
QIcon testItemIcon(":/images/undo.png");
foreach(QString str2, myStringList2){
QListWidgetItem *testItem = new QListWidgetItem(testItemIcon, str2, customerList);
customerList->addItem(testItem);
QRadialGradient gradient(100, 100, 100, 100, 100);
gradient.setColorAt(0, QColor::fromRgbF(210, 239, 109,0));
gradient.setColorAt(1, QColor::fromRgbF(0, 1, 0, 0));
QBrush brush(gradient);
testItem->setBackground(brush);
}
To copy to clipboard, switch view to plain text mode
Bookmarks