qtstylesheets

Different hover styling on different labels

回眸只為那壹抹淺笑 提交于 2020-07-31 05:50:13
问题 self.scrollArea.setStyleSheet("background-color: rgba(255, 0, 0, 0); border-style:none;\n" "}\n" "QLabel#label2 { \n" " background-color: rgba(0, 0, 0, 120); color: white; text: center; border-style:solid; border- width: 1px; border-top-style: none;\n" "}\n" "QLabel#label3 { \n" "background-color: rgba(0, 0, 0, 0); color: rgba(255, 255, 255, 0); text: center;\n" "}\n" "QLabel:hover + QLabel#label2{ \n" "background-color: rgb(0, 0, 0, 120); color: rgba(255,255,255,255); text: center;\n" "}\n"

QFrame round border transparent background

帅比萌擦擦* 提交于 2020-07-19 06:47:04
问题 I'm creating a round context menu using QFrame. To make round corner, I used Qt style sheet. Here is my CSS this->setStyleSheet("QFrame#ShareContextMenu{background-color:rgb(255,255,255); border-width:1px; border-color :rgb(0,0,0); border-radius:10px; border-style:solid;} QPushButton{background-color:rgba(255,255,255,0);} QPushButton::hover{background-color:rgba(125,125,125,50); border-radius:5px;}"); How can I remove the white background marked with red circles in this picture?. Edit: Here

How to set background color of QComboBox button?

て烟熏妆下的殇ゞ 提交于 2020-07-09 10:51:13
问题 Version/Environment: Windows 10 64 bit Qt 5.11.0 MSVC2017 64 bit I have a simple QComboBox to enable/disable a feature: QComboBox *onOffComboBox = new QComboBox(); onOffComboBox->insertItem(0, "Off"); onOffComboBox->insertItem(1, "On"); The combo box is added as a cell widget to a table: this->ui->settingsTable->setCellWidget(rowNumber, 1, onOffComboBox); Now i want to change the background color of the button but not the select items. My first approach was simply to use QWidget 's

How to set background color of QComboBox button?

元气小坏坏 提交于 2020-07-09 10:46:23
问题 Version/Environment: Windows 10 64 bit Qt 5.11.0 MSVC2017 64 bit I have a simple QComboBox to enable/disable a feature: QComboBox *onOffComboBox = new QComboBox(); onOffComboBox->insertItem(0, "Off"); onOffComboBox->insertItem(1, "On"); The combo box is added as a cell widget to a table: this->ui->settingsTable->setCellWidget(rowNumber, 1, onOffComboBox); Now i want to change the background color of the button but not the select items. My first approach was simply to use QWidget 's

How to set background color of QComboBox button?

。_饼干妹妹 提交于 2020-07-09 10:45:53
问题 Version/Environment: Windows 10 64 bit Qt 5.11.0 MSVC2017 64 bit I have a simple QComboBox to enable/disable a feature: QComboBox *onOffComboBox = new QComboBox(); onOffComboBox->insertItem(0, "Off"); onOffComboBox->insertItem(1, "On"); The combo box is added as a cell widget to a table: this->ui->settingsTable->setCellWidget(rowNumber, 1, onOffComboBox); Now i want to change the background color of the button but not the select items. My first approach was simply to use QWidget 's