Hai,
Qt Code:
for(int i=0; i<3; i++) { QStringList strings; ui->firstTreeWidget->addTopLevelItem(parent); parent->addChild(child); }To copy to clipboard, switch view to plain text mode
Icon is not setting . Is there any problem in the code
Hai,
Qt Code:
for(int i=0; i<3; i++) { QStringList strings; ui->firstTreeWidget->addTopLevelItem(parent); parent->addChild(child); }To copy to clipboard, switch view to plain text mode
Icon is not setting . Is there any problem in the code
If you get *.ico file from resource, this file will be for example like this:
123.jpg
Use code QIcon(":images/heart.ico"), not QIcon(":/images/heart.ico")
Or try load *.png file
Thanx Jonny174 . but i dont still get the image . i want it next to the " Witname". what can i do in this?
arent->setIcon( 0, QPixmap::fromImage( QImage("file.ico") ) );
vinayaka (2nd March 2012)
Bookmarks