I have a toolbutton created in Designer with an action actionEdits.
Made it a toggle button with a little code. Would like to change the icon when it toggles. The icon from Designer comes up fine when the application starts, but when you click the icon, it disappears as the code tries to change it.

The icon files are both in a directory <application-root>/images and listed in the qrc with all my other icons. Yes, I did run qmake after adding them.
And
Qt Code:
  1. QDirIterator it(":", QDirIterator::Subdirectories);
  2. while (it.hasNext())
  3. qDebug() << it.next();
To copy to clipboard, switch view to plain text mode 
Shows they are there.
Here is the code for changing the icon on toggle, but it is obviously not working since the icon disappears on the first click.
Qt Code:
  1. ui->actionEdits->setIcon(QIcon("./images/application_edit.png"));
To copy to clipboard, switch view to plain text mode 
So what could be wrong here?