Qt样式qss测试项目使用qss文件设置qt样式
/**菜单栏**/ QMenuBar{ background:rgb(50, 74, 86); color:rgb(253,253,253); } /*工具栏*/ QToolBar{ background:rgb(50, 74, 86); } /*工具栏按钮*/ QToolButton{ background-color: rgb(50, 74, 86 ,0); color:rgb(253,253,253); border: 0px solid; } QToolButton::hover{ background-color: rgb(78, 184, 239); } QToolButton::pressed{ background-color: rgb(50, 74, 86); } /*工具栏标签*/ QLabel{ background-color: rgb(50, 74, 86,0); color:rgb(253,253,253); border: 0px solid; } /*工具栏combobox*/ QComboBox{ background-color: rgb(255, 255, 255); color:rgb(0,0,0); border: 0px solid; } /*状态栏*/ QWidget#statusbar{ background-color:rgba(50, 74, 86); } /*实体列表*/ QLabel#entitywidget{ background-color: rgba(52, 83, 104); } QFrame#hline{ background-color: rgb(255, 255, 255); } QListWidget#blueList{ background-color: rgb(152, 83, 104,0); color: rgb(69, 171, 216); } QListWidget#redList{ background-color: rgb(152, 83, 104,0); color: rgb(228 ,92,119); } QLabel#redlabel{ background-color: rgb(239, 41, 41 ,100); } QLabel#bluelabel{ background-color: rgb(114, 159, 207,100); } /*装备列表*/ QLabel#equipwidget{ background-color: rgba(52, 83, 104); } QLabel#lbname{ background-color: rgba(69, 171, 216,0); color: rgb(69, 171, 216); } QLabel#lrname{ background-color: rgba(228 ,92,119,0); color: rgb(228 ,92,119); } QToolButton#bluebt{ color:rgb(69, 171, 216); } QToolButton#redbt{ color:rgb(228 ,92,119); } /*新建对话框*/ QDialog#newproject{ background-color: rgba(52, 83, 104); } QDialog#openproject{ background-color: rgba(52, 83, 104); } /*打开对话框*/ QDialog#openproject{ background-color: rgba(29, 110, 128); } QHeaderView{ /**表头**/ border-bottom: 2px solid rgb(29, 110, 128); /*蓝色*/ background: rgb(29, 110, 128); min-height: 20px; } QHeaderView::section:horizontal,QHeaderView::section:vertical{ background: rgb(29, 110, 128); color:rgb(255,255,255); } /**/ QTableView { border : 1px solid rgba(52, 83, 104); background: rgb(29, 110, 128); gridline-color: rgb(111, 156, 207); } QTableView::item { padding : 2px; color:rgb(255,255,255); } /*提示框*/ QMessageBox{background-color: rgba(37,105, 138);} /*编辑模型信息*/ QWidget#editdeploy{ background-color: rgba(37,105, 138); } /*设置信息*/ QWidget#editmissile{ background-color: rgba(37,105, 138); } /*列表和输出框*/ QLabel#m_entitylist_outinfo{ background-color: rgba(52, 83, 104); } /*任务框*/ QDialog#tasks{ background-color: rgba(52, 83, 104); } /*任务框,单选按钮样式*/ QRadioButton{ color:rgb(255,255,255); } QRadioButton::indicator:checked{ background-color:rgb(7,161,239); border-radius: 7.8px; border: 3px solid white; } /*航路点窗口*/ QWidget#waypoint{ background-color: rgba(29, 110, 128); } /*回放对话框*/ QDialog#playback{ background-color: rgba(29, 110, 128); } /*创建回放对话框*/ QDialog#createplayrecord{ background-color: rgba(29, 110, 128); } /*配置对话框*/ QDialog#missileconfig{ background-color: rgba(29, 110, 128); }