QCheckBox use of local QSS Picture Style

setStyleSheet for the following string, checked, unchecked, has the focus, the display is not the same as the picture without focus

QString("QCheckBox::indicator:unchecked{image:url(%1);}"
        "QCheckBox::indicator:checked{image:url(%2);}"
        "QCheckBox::indicator:unchecked:focus{image:url(%3);}"
        "QCheckBox::indicator:checked:focus{image:url(%4);}"
                                          "").arg("/unchecked.png",
                                                   "/checked.png",
                                                   "/unchecked2.png",
                                                   "/checked2.png");

 

Guess you like

Origin www.cnblogs.com/nanqiang/p/11905095.html