I have set the icon for one of my QPushButtons using the Qt standard icons (as an aside, how do I do this in Designer?)
Qt Code:
  1. ui->pushButton->setIcon(qApp->style()->standardIcon(QStyle::SP_ArrowRight));
To copy to clipboard, switch view to plain text mode 

My desired functionality is to have the button pop up a QDockWidget while clicked/checked, then have it close the QDockWidget when clicked again. The button should be in a depressed state while the dock widget is open and should appear normal when the widget is closed.

Does this functionality already exist somewhere in another widget, or do I need to recreate it somehow? If I need to recreate it, how do I access the greyed-out version of the standard icon? Basically, I'd like to set the button to appear disabled, but still function as if it's enabled. Is that possible?