qtstylesheets Questions

7

Solved

Is there any possibility of giving variable name to hex/rgb numbers in .qss file . For eh myColor = #FFCC08 QPushButton { background-color: myColor;} So that i can define the variable at the top...
Quintessence asked 5/6, 2012 at 13:39

3

I'm trying to change the style of my QLabel using a dynamic property since we can target this property in QSS like this: QLabel[foo = "warning"]{ color: red; } QLabel[foo = "success"]{ color: gree...
Chloral asked 21/3, 2014 at 15:19

2

Solved

I wrote Qt4 (or Qt5) class MyButton and defined two boolean properties, like this: #include <QPushButton> class MyButton : QPushButton { Q_OBJECT Q_PROPERTY(bool property_1 READ property_...
Reservoir asked 8/7, 2014 at 12:16

5

Solved

I'm using Qt and I have a QTabWidget setup in the Qt Designer Editor, you can see it in picture 1. As you can see after Tab4 there is an empty space all the way to the right edge, in someway I ...
Devonne asked 19/3, 2010 at 21:43

2

Solved

I would like to change the colors of a QTableWidget. I am almost getting the result I like, but two areas in the vertical header remain white: Before writing this post I actually managed to color ...
Fogbow asked 5/11, 2020 at 18:2

3

Solved

How to set QTableWidget upper left corner using a background image? Now it is white. (Pointed in the image below) This is my style sheet code: QWidget { background-image: url(src/bg.jpg); col...
Backwater asked 3/1, 2017 at 10:3

2

Solved

I created QPushButton in Qt Designer with this stylesheet: QPushButton#pushButton { background-color: #ffffff; } QPushButton#pushButton:disabled { background-color: yellow; } QPushButton#pushB...
Ravenous asked 7/1, 2016 at 11:56

5

Solved

I am using following code to connect QMenu to QPushButton. When button is clicked a pull-down menu with multiple sub-menu's items is shown. button=QPushButton() button.setText("Press Me") font=Qt...
Lindell asked 9/7, 2014 at 16:35

7

I'm fairly new to Qt's method of stylesheets and I am looking to adjust the spacing between the icon and text on a QPushButton. This is the gap I'm referring to: http://imageshack.us/scaled/thumb/...
Condense asked 27/6, 2013 at 14:17

4

Solved

I used this as my button pushButton's stylesheet: QPushButton#pushButton { background-color: yellow; } QPushButton#pushButton:pressed { background-color: rgb(224, 0, 0); } QPushButton#pushButton...
Inkstand asked 3/10, 2013 at 13:54

2

Solved

The QMainWindow below is assigned a dark-gray background-color using QSS. I would also like to change the color of the borders and the color of the title bar. How to achieve control of the appear...
Delmore asked 12/2, 2015 at 15:16

1

Solved

I know how to use QPushButton:hover in the stylesheet for my QMainWindow(). However for only one single button I want to have a different :hover result. Is there a way to use the :hover-function wh...
Emf asked 18/5, 2021 at 11:44

1

Solved

I have downloaded these stylesheets of QT designer: https://github.com/Alexhuszagh/BreezeStyleSheets And I would like to link the qss file "dark.qss" directly in the .ui file in the QT de...
Normannormand asked 17/9, 2020 at 11:15

1

Solved

I am trying to change the color of some labels in pyqt5 by setting their style sheets like so: background-color : lightblue My problem is I don't know what colors I am allowed to use. For exampl...
Tarr asked 5/6, 2020 at 16:41

5

Solved

I want to style the highlighting of chosen item in drop-down of combobox. The difference to other questions is that I do not want to style "selected" item (hovered over), but to style the already ...
Estefanaestel asked 29/4, 2015 at 9:44

5

Solved

I want to style my tabs in my Qt app as follows: I used following style sheet: QTabBar{background-color: #fff; border-top: 0px;} QTabBar::tab { border-image: url(:/New_UI/tab_inactive.png) 7 1...
Autrey asked 30/10, 2012 at 10:29

3

Solved

I know I can use setStyleSheet() to set styles in Qt. But when I use setStyleSheet() twice, the first styles are lost, which are set by first use of setStyleSheet(). For example, setStyleSheet(&quo...
Daggett asked 6/5, 2014 at 8:49

1

Solved

I'm practicing my programming skills and I am trying to build a login-system application with PyQt. I designed it after Login V4 . Now I'm trying to achieve that cool gradient animation from the Lo...
Norman asked 5/10, 2019 at 13:16

6

Solved

I have several custom widget in my current project. I wish to apply stylesheets to them and when I do so inside Qt Creator, it appears to work. However, when executing the program, no stylesheet is...
Tameshatamez asked 1/9, 2011 at 20:48

2

Solved

I am attempting to create a custom QWidget (from PyQt5) whose background colour can change. However, all the standard methods of setting the background colour do not seem to work for a custom QWidg...
Ubangi asked 3/9, 2019 at 20:37

4

Solved

How to hide QScrollBar arrows? I need to hide in horizontal scrollbar. I was trying to hide with setStyleSheet: setStyleSheet(" QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizonta...
Dynamoelectric asked 16/1, 2014 at 8:54

3

Solved

I'm trying to remove the dotted border on the text in this QListView::item using stylesheets: I've tried variations of border: 0 and show-decoration-selected: 0 on QListView, QListView::item and...
Girondist asked 5/4, 2013 at 9:30

3

Solved

I'm trying to style a combobox in QT5. I'm using QT Creator for the layout and loading an app-wide style sheet at start up. The css I have related to my combobox is as follows: QComboBox { color...
Vociferance asked 27/6, 2014 at 8:26

2

Solved

# -*- coding: utf-8 -*- import sys from PyQt4.QtGui import * from PyQt4.QtCore import * class MainWindow(QWidget): def __init__(self): super(MainWindow, self).__init__() self.setFixedWidth(...
Diaphysis asked 19/3, 2014 at 11:28

1

I have styled my tooltips like this (not really that colors) QToolTip { border: 1px solid blue; border-radius: 10px; background-color: red; } But the background is not clipped at the corners:...
Trainor asked 24/8, 2016 at 10:20

© 2022 - 2024 — McMap. All rights reserved.