Thanks JP.
This does work, I've changed my backgrounds/sounds/icons to follow this format, seems much easier.
However for my ui form icons I think the best method would be for me to create the icons outside the form in my window. Doing so will allow me to implement the same method for them.
This code is in the designer. I cannot easily access the icon variable from my window because it is not public. Only the listWidget variable is public. If I can somehow set the icons of my listWidget outside the ui form that would be much easier OR I can just use this code outside my ui form (in my window).
__listItem->setIcon(icon);
listWidget = new QListWidget(systemProgram);
QIcon icon;
icon.addPixmap(QPixmap(QString::fromUtf8("../resources/images/exec.png")), QIcon::Normal, QIcon::Off);
QListWidgetItem *__listItem = new QListWidgetItem(listWidget);
__listItem->setIcon(icon);
To copy to clipboard, switch view to plain text mode
Bookmarks