Skip to content

Commit

Permalink
update qss
Browse files Browse the repository at this point in the history
  • Loading branch information
dingjiangfeng committed Jul 24, 2014
1 parent 537c211 commit 0273929
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 18 deletions.
12 changes: 6 additions & 6 deletions functionpages/uielement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ void UIElement::initTableWidget()
void UIElement::initTreeWidget()
{
QTreeWidget *treeWidget = new QTreeWidget;
treeWidget->setItemDelegate(new FNoFocusDelegate);
// treeWidget->setItemDelegate(new FNoFocusDelegate);
treeWidget->setFocusPolicy(Qt::NoFocus);
treeWidget->setHeaderHidden(true);
treeWidget->setColumnCount(1);
treeWidget->setColumnCount(3);
QList<QTreeWidgetItem *> items;
for (int i = 0; i < 10; ++i)
{
Expand All @@ -136,7 +136,7 @@ void UIElement::initTreeWidget()
treeWidget->insertTopLevelItems(0, items);

QTreeWidget *treeWidget2 = new QTreeWidget;
treeWidget2->setItemDelegate(new FNoFocusDelegate);
// treeWidget2->setItemDelegate(new FNoFocusDelegate);
treeWidget2->setFocusPolicy(Qt::NoFocus);
QStringList labels;
labels << tr("rpcID") << tr("rpcType") << tr("rpcDetail");
Expand All @@ -153,14 +153,14 @@ void UIElement::initTreeWidget()
{
QStringList childs;
childs << tr("%1").arg(j) << tr("alert") << tr("show warning");
items2.at(i)->addChild(new QTreeWidgetItem(treeWidget2, childs));
items2.at(i)->addChild(new QTreeWidgetItem(items2.at(i), childs));
}
}
treeWidget2->insertTopLevelItems(0, items2);


QTreeWidget *treeWidget3 = new QTreeWidget;
treeWidget3->setItemDelegate(new FNoFocusDelegate);
// treeWidget3->setItemDelegate(new FNoFocusDelegate);
treeWidget3->setFocusPolicy(Qt::NoFocus);
QStringList labels3;
labels3 << tr("rpcID") << tr("rpcType") << tr("rpcDetail");
Expand All @@ -180,7 +180,7 @@ void UIElement::initTreeWidget()
{
QStringList childs3;
childs3 << tr("%1").arg(j) << tr("alert") << tr("show warning");
QTreeWidgetItem* sitem = new QTreeWidgetItem(treeWidget3, childs3);
QTreeWidgetItem* sitem = new QTreeWidgetItem(fitem, childs3);
sitem->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsSelectable |Qt::ItemIsEnabled);
sitem->setCheckState(0, Qt::Checked);
items3.at(i)->addChild(sitem);
Expand Down
60 changes: 54 additions & 6 deletions skin/qss/fblue.qss
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,55 @@ QMenu::indicator {
}
/* ******************QMenu****************** */

/* ******************QComboBox****************** */
QComboBox{
color:white;
font-size: 15px;
font-family: "Verdana";
background-color: rgb(5, 9, 21);
}

QComboBox:on{
background-color: rgb(5, 9, 21);
}

QComboBox::drop-down :on{
background-color: rgb(5, 9, 21);
}

QComboBox::drop-down {
subcontrol-origin: padding;
subcontrol-position: top right;
width: 15px;
}

QComboBox QAbstractItemView {
border: none;
color:white;
background-color:rgb(47, 54, 65);
font-size: 15px;
font-family: "Verdana";
}


QComboBox QAbstractItemView::item{
height: 40px;
color:white;
font-size: 15px;
}

QComboBox QAbstractItemView::item:selected{
background-color: rgb(63, 147, 168);
}

QComboBox QAbstractItemView::item:hover{
background-color: rgb(63, 147, 168);
}

QComboBox:disabled{
background-color: gray;
}
/* ******************QComboBox****************** */
/* ******************QStatusBar****************** */
QStatusBar {
color: white;
Expand Down Expand Up @@ -116,11 +164,11 @@ QSplitter::handle {
}

QSplitter::handle:horizontal {
width: 3px;
width: 1px;
}

QSplitter::handle:vertical {
height: 3px;
height: 1px;
}

QSplitter::handle:pressed {
Expand Down Expand Up @@ -194,24 +242,24 @@ QTreeView::item:selected:!active {
QTreeWidget::branch:closed:has-children:!has-siblings,
QTreeWidget::branch:closed:has-children:has-siblings {
border-image: none;
image: url(:/skin/images/rightsolidarrow.png);
image: url(:/images/skin/images/rightsolidarrow.png);
}

QTreeWidget::branch:closed:has-children:!has-siblings,
QTreeWidget::branch:closed:has-children:has-siblings:hover {
border-image: none;
image: url(:/skin/images/rightsolidarrow.png);
image: url(:/images/skin/images/rightsolidarrow.png);
}

QTreeWidget::branch:open:has-children:!has-siblings,
QTreeWidget::branch:open:has-children:has-siblings {
border-image: none;
image: url(:/skin/images/downsolidarrow.png);
image: url(:/images/skin/images/downsolidarrow.png);
}
QTreeWidget::branch:open:has-children:!has-siblings,
QTreeWidget::branch:open:has-children:has-siblings:hover {
border-image: none;
image: url(:/skin/images/downsolidarrow.png);
image: url(:/images/skin/images/downsolidarrow.png);
}
/* ******************QTreeWidget****************** */

Expand Down
59 changes: 53 additions & 6 deletions skin/qss/main.qss
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,55 @@ QMenu::indicator {
height: 13px;
}
/* ******************QMenu****************** */
/* ******************QComboBox****************** */
QComboBox{
color:white;
font-size: 15px;
font-family: "Verdana";
background-color: rgb(5, 9, 21);
}

QComboBox:on{
background-color: rgb(5, 9, 21);
}

QComboBox::drop-down :on{
background-color: rgb(5, 9, 21);
}

QComboBox::drop-down {
subcontrol-origin: padding;
subcontrol-position: top right;
width: 15px;
}

QComboBox QAbstractItemView {
border: none;
color:white;
background-color:rgb(47, 54, 65);
font-size: 15px;
font-family: "Verdana";
}


QComboBox QAbstractItemView::item{
height: 40px;
color:white;
font-size: 15px;
}

QComboBox QAbstractItemView::item:selected{
background-color: rgb(63, 147, 168);
}

QComboBox QAbstractItemView::item:hover{
background-color: rgb(63, 147, 168);
}

QComboBox:disabled{
background-color: gray;
}
/* ******************QComboBox****************** */
/* ******************QStatusBar****************** */
QStatusBar {
color: black;
Expand Down Expand Up @@ -191,24 +238,24 @@ QTreeView::item:selected:!active {
QTreeWidget::branch:closed:has-children:!has-siblings,
QTreeWidget::branch:closed:has-children:has-siblings {
border-image: none;
image: url(:/skin/images/rightsolidarrow.png);
image: url(:/images/skin/images/rightsolidarrow.png);
}

QTreeWidget::branch:closed:has-children:!has-siblings,
QTreeWidget::branch:closed:has-children:has-siblings:hover {
border-image: none;
image: url(:/skin/images/rightsolidarrow.png);
image: url(:/images/skin/images/rightsolidarrow.png);
}

QTreeWidget::branch:open:has-children:!has-siblings,
QTreeWidget::branch:open:has-children:has-siblings {
border-image: none;
image: url(:/skin/images/downsolidarrow.png);
image: url(:/images/skin/images/downsolidarrow.png);
}
QTreeWidget::branch:open:has-children:!has-siblings,
QTreeWidget::branch:open:has-children:has-siblings:hover {
border-image: none;
image: url(:/skin/images/downsolidarrow.png);
image: url(:/images/skin/images/downsolidarrow.png);
}
/* ******************QTreeWidget****************** */

Expand Down Expand Up @@ -551,13 +598,13 @@ QPushButton#Voice{
}

QPushButton#Voice:hover{
background-color: rgb(69, 187, 217);
background-color: rgb(33, 50, 70);
color: rgb(40, 47, 63);
/*border:1px black;*/
}

QPushButton#Voice:checked{
background-color: rgb(63, 147, 168);
background-color: rgb(34, 44, 56);
color: white;
}

Expand Down

0 comments on commit 0273929

Please sign in to comment.