首页 > 代码库 > QT_动态样式管理

QT_动态样式管理

    void CPlaySlider::updatesliderstyle()
    {
        ui.suspend_slider->style()->unpolish(ui.suspend_slider);
        ui.suspend_slider->style()->polish(ui.suspend_slider);
        ui.suspend_slider->update();
    }
    void CPlaySlider::setslidersuspendstyle()
    {
        ui.suspend_slider->setProperty("suspend_sliderProperty", "suspend");
        updatesliderstyle();
    }
    void CPlaySlider::setsliderrunstyle()
    {
        ui.suspend_slider->setProperty("suspend_sliderProperty", "run");
        updatesliderstyle();
   }

技术分享

QT_动态样式管理