Questions tagged [qtstylesheets]
For questions relating to Qt Style Sheets, which allow declarative customization of Qt objects.
qtstylesheets
795
questions
0
votes
1
answer
43
views
Cleaner methods for creating multi-variable animations in PyQt5 (css)?
I recently came across an example code for animating a widget using QVariantAnimation, the QVariantAnimation has a start and end point, and the calculated value is injected into the css of the button ...
1
vote
1
answer
54
views
Creating a nuance-styled button with css in pyqt5
I came across a button style which I like, I wanted to recreate it for use in pyqt5, using the QPushButton class, and styling it with css. If I can recreate it, I can change it's colours in cool ways.
...
0
votes
0
answers
15
views
How to change scrollbar background in QT Designer? [duplicate]
I don't understand why the background colour of the scrollbar doesn't change.
The colour of the slider itself changes, but the background does not. Instead, the background is grainy (you can see on ...
1
vote
1
answer
62
views
Hide indicators for QComboBox (qdarkstyle)
I am using qdarkstyle on my PyQt5 GUI, and I am trying to make a widget with internal combo boxes. The items in the combo box all have a square indicator to the left hand side that I want to hide.
I ...
0
votes
0
answers
28
views
How i can change color or remove the default lines from my installer using Qt Installer Framework
The Qt installer Framework have a default gray lines top and bottom of page.
Example here:
I need to remove or colorize this lines for my styled installer. I was tried it using QSS (Qt Css) but ....
0
votes
0
answers
19
views
Can I define different global styles for QListWidgetItems
I am using a global qss stylesheet for my PyQt5 application.
Now I have different types of QListWidgetItem which require different styles and would like to do this with a single qss file.
A QObject ...
0
votes
0
answers
85
views
QComboBox last highlighted item's corners intersect with the popup's border [duplicate]
I reimplemented QComboBox class and added rounded corners to popup panel:
But when the last item is highlighted, its corners intersect the popup border.
I want to make selection bottom corners round ...
0
votes
0
answers
43
views
Grey-out QLineEdit as per disabled state automatically, combined with non-conditional style sheet directive?
By default, a QLineEdit is greyed-out when disabled.
If you set a stylesheet with a simple directive, e.g. setting a border, this cancels that default behaviour.
Fortunately it is possible to mimic ...
0
votes
1
answer
59
views
Can I change the style of a QObject by changing the ObjectName via stylesheets? [duplicate]
I recently learned about the nice possibility to style objects in Qt with a stylesheet. Now I want to change the background color of a QFrame after a specific event happened. So I set up two entries:
...
0
votes
1
answer
139
views
Change QSlider's add/sub page colors from the centre
I want to design a QSlider, which in the design sheet looks like this:
The slider groove color is the same for all slider parts, regardless of the slider handle being in its centre. In the design ...
1
vote
1
answer
96
views
Selection color for QTableWidget cell is different if custom cellwidget is used
I wrote a custom table widget which is derived from QTableWidget. The last two columns in this widget use a custom cell widget (one containing a QCheckBox, the other a QLineEdit, with some optional ...
0
votes
0
answers
61
views
PushButton Color Change By Mouse move
I want to have a push button in Qt C++ which changes color while hovered.
I have tried creating a custom class from QPushButton and overriding enterEvent and leaveEvent methods as below, but it didn't ...
1
vote
1
answer
223
views
How to set color of the whole row in QTreeView when item is selected?
I'm working on a PySide2 GUI project on Centos7.6.
I attempted to change the color of a row when it is selected:
QTreeView::item:selected {
background-color: rgba(48, 140, 198, 128);
}
...
0
votes
0
answers
56
views
Qt Stylesheet targeting a specific groupbox by title
I want to have different stylesheet for groupboxes with title and those without title like this
groupboxes with title: margin-top:5px
groupboxes with empty title: margin-top:0px
I think this should be ...
0
votes
1
answer
325
views
How to set custom properties through style sheets
Trying to keep styling separate from the rest of my PyQt code, I try to do my styling using qss files. However, doing all the styling using this seems to be difficult (if not impossible).
What would ...