LordQt
24th August 2007, 14:14
Hello Friends.
How can I modify the size of my icon in my QListWidgetItem. I have an png with 128*128
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);
}
but my icon is quit little and i don´t know why??
Have you some ideas
How can I modify the size of my icon in my QListWidgetItem. I have an png with 128*128
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);
}
but my icon is quit little and i don´t know why??
Have you some ideas