zoukankan      html  css  js  c++  java
  • Qt设置圆角按钮样式

    Qt中使用stylesheet方式将按钮设置成圆角按钮,代码如下:

    setStyleSheet("border:2px groove gray;border-radius:10px;padding:2px 4px;");

    如pushButton如下用法:

    pushButton->setStyleSheet("border:2px groove gray;border-radius:10px;padding:2px 4px;");


    更多>setStyleSheet用法如下:

    qApp->setStyleSheet("QLineEdit { background-color: yellow }");

    myDialog->setStyleSheet("QLineEdit { background-color: yellow }");

    myDialog->setStyleSheet("QLineEdit#nameEdit { background-color: yellow }");

    nameEdit->setStyleSheet("background-color: yellow");

    nameEdit->setStyleSheet("color: blue; background-color: yellow");

    nameEdit->setStyleSheet("color: blue;"
                             "background-color: yellow;"
                             "selection-color: yellow;"
                             "selection-background-color: blue;");

  • 相关阅读:
    OI省选知识清单
    FWT板子
    [APIO2018]选圆圈
    [APIO2018]铁人两项
    [Test-1.11]-T4 Transform
    [Test-1.11]-T2divisor
    [Test1.11]-T3对合
    [Test3.3]-T3 Sorting (卡常)
    [Test1.11]-T1匹配 Matching
    二、Unity调用Xcode封装方法
  • 原文地址:https://www.cnblogs.com/qq78292959/p/2646144.html
Copyright © 2011-2022 走看看