Author

Topic: How to make QToolbar's icons change when clicked? (Read 184 times)

sr. member
Activity: 630
Merit: 256
I also have tried modifying light.css file (theme css file) with the following:

Code:
QToolBar > QToolButton:checked {
border-image: url(':/icons/light/overview') 0 0 0 0 stretch stretch;
background-color:opacity:0.52;
border:20px solid #282828;
color:#fff;
font-weight:bold;
}

It did not change anything at all too.
sr. member
Activity: 630
Merit: 256
I'm now trying to make QT wallet client change icon into another one, when the icon is clicked (checked).

I've added the following line:

Code:
new QAction(QIcon(":/icons/" "/overview2"), tr("&"), (this));

to Bitcoingui.cpp file, it did compile, but it did not change anything. When I click on an icon it stays the same.

Code:
void BitcoinGUI::gotoOverviewPage()
{
    overviewAction->setChecked(true);
    if (walletFrame) walletFrame->gotoOverviewPage();
->    new QAction(QIcon(":/icons/" "/overview2"), tr("&"), (this));
}


Any ideas how to do it?
Jump to: