Bitcoin Forum
April 26, 2024, 11:10:13 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to make QToolbar's icons change when clicked?  (Read 151 times)
SBDomains (OP)
Sr. Member
****
Offline Offline

Activity: 630
Merit: 256



View Profile
January 19, 2019, 12:14:19 PM
Last edit: January 19, 2019, 12:30:47 PM by SBDomains
 #1

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?

 
                                . ██████████.
                              .████████████████.
                           .██████████████████████.
                        -█████████████████████████████
                     .██████████████████████████████████.
                  -█████████████████████████████████████████
               -███████████████████████████████████████████████
           .-█████████████████████████████████████████████████████.
        .████████████████████████████████████████████████████████████
       .██████████████████████████████████████████████████████████████.
       .██████████████████████████████████████████████████████████████.
       ..████████████████████████████████████████████████████████████..
       .   .██████████████████████████████████████████████████████.
       .      .████████████████████████████████████████████████.

       .       .██████████████████████████████████████████████
       .    ██████████████████████████████████████████████████████
       .█████████████████████████████████████████████████████████████.
        .███████████████████████████████████████████████████████████
           .█████████████████████████████████████████████████████
              .████████████████████████████████████████████████
                   ████████████████████████████████████████
                      ██████████████████████████████████
                          ██████████████████████████
                             ████████████████████
                               ████████████████
                                   █████████
CryptoTalk.org| 
MAKE POSTS AND EARN BTC!
🏆
1714173013
Hero Member
*
Offline Offline

Posts: 1714173013

View Profile Personal Message (Offline)

Ignore
1714173013
Reply with quote  #2

1714173013
Report to moderator
1714173013
Hero Member
*
Offline Offline

Posts: 1714173013

View Profile Personal Message (Offline)

Ignore
1714173013
Reply with quote  #2

1714173013
Report to moderator
"This isn't the kind of software where we can leave so many unresolved bugs that we need a tracker for them." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714173013
Hero Member
*
Offline Offline

Posts: 1714173013

View Profile Personal Message (Offline)

Ignore
1714173013
Reply with quote  #2

1714173013
Report to moderator
SBDomains (OP)
Sr. Member
****
Offline Offline

Activity: 630
Merit: 256



View Profile
January 19, 2019, 03:30:34 PM
 #2

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.

 
                                . ██████████.
                              .████████████████.
                           .██████████████████████.
                        -█████████████████████████████
                     .██████████████████████████████████.
                  -█████████████████████████████████████████
               -███████████████████████████████████████████████
           .-█████████████████████████████████████████████████████.
        .████████████████████████████████████████████████████████████
       .██████████████████████████████████████████████████████████████.
       .██████████████████████████████████████████████████████████████.
       ..████████████████████████████████████████████████████████████..
       .   .██████████████████████████████████████████████████████.
       .      .████████████████████████████████████████████████.

       .       .██████████████████████████████████████████████
       .    ██████████████████████████████████████████████████████
       .█████████████████████████████████████████████████████████████.
        .███████████████████████████████████████████████████████████
           .█████████████████████████████████████████████████████
              .████████████████████████████████████████████████
                   ████████████████████████████████████████
                      ██████████████████████████████████
                          ██████████████████████████
                             ████████████████████
                               ████████████████
                                   █████████
CryptoTalk.org| 
MAKE POSTS AND EARN BTC!
🏆
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!