zoukankan      html  css  js  c++  java
  • QSlider 样式

     https://doc.qt.io/archives/qt-4.8/stylesheet-examples.html

    #if 0
        m_sliderVoice->setStyleSheet("
                    QSlider::groove:vertical {
                    border: 1px solid #4A708B;
                    background: #C0C0C0;
                     50px;
                    border-radius: 1px;
                    padding-left:-1px;
                    padding-right:-1px;
                    padding-top:-1px;
                    padding-bottom:-1px;
                    }
                    
                    QSlider::sub-page:vertical {
                    background: #575757;
                    border: 1px solid #4A708B;
                    border-radius: 2px;
                    }
                    
                    QSlider::add-page:vertical {
                    background: qlineargradient(x1:0, y1:0, x2:0, y2:1, 
                        stop:0 #c4c4c4, stop:1 #B1B1B1);
                    background: qlineargradient(x1: 0, y1: 0.2, x2: 1, y2: 1,
                        stop: 0 #5DCCFF, stop: 1 #1874CD);
                    border: 0px solid #777;
                     10px;
                    border-radius: 2px;
                    }
                    
                    QSlider::handle:vertical 
                    {
                        background: qradialgradient(spread:pad, cx:0.5, cy:0.5, "
                                         "radius:0.5, fx:0.5, fy:0.5, stop:0.6 #45ADED, 
                    <span>    </span>stop:0.778409 rgba(255, 255, 255, 0));
                    
                        height: 100px;
                        margin-left: -30px;
                        margin-right: 30px;
                        border-radius: 5px;
                    }"
                                    );
    #else
        m_sliderVoice->setStyleSheet("
                    QSlider::groove
                    {
                       background-color: grey;
                        50px;
                    }
                    QSlider::handle
                    {
                        background-color:#05B8CC;
                        border: 3px solid #05B8CC;
                        height: 50px;
                    } 
                    QSlider::sub-page
                    {
                        background-color:grey;
                    }
                    QSlider::add-page
                    {
                        background-color:white;
                    }
                    ");
    #endif
  • 相关阅读:
    IEnumerator & IEnumerable
    GameObject.Active
    Unity3D的四种坐标系
    gvim
    Platform Dependent Compilation
    delegate
    new 约束
    UIPanel
    UIButton
    UISprite
  • 原文地址:https://www.cnblogs.com/nanqiang/p/11730616.html
Copyright © 2011-2022 走看看