Hi, sorry but I have to re-open this post. This time I need to do some questions about the code that Xagen kindly posted previously in this post:
1) Can Xagen or someone else please explain me why an assignation of a pixmap in the same icon 2 times?
m_folderIcon.
addPixmap(style
->standardPixmap
(QStyle::SP_DirClosedIcon),
m_folderIcon.
addPixmap(style
->standardPixmap
(QStyle::SP_DirOpenIcon),
m_folderIcon.addPixmap(style->standardPixmap(QStyle::SP_DirClosedIcon),
QIcon::Normal, QIcon::Off);
m_folderIcon.addPixmap(style->standardPixmap(QStyle::SP_DirOpenIcon),
QIcon::Normal, QIcon::On);
To copy to clipboard, switch view to plain text mode
2) The method "folderIcon" which of both pixmaps will contain the returned icon? And why doesn't access directly to the variable "m_folderIcon" ? as seems that's the purpose...
newItem->setIcon(0, folderIcon());
newItem->setIcon(0, folderIcon());
To copy to clipboard, switch view to plain text mode
Thanks.
Bookmarks