Unsolved QTablewidget insert check box and do alot
-
This post is deleted! -
@ManiRon Layout is missing.
-
It worked sir thanks
-
Sir i inserted a background image and set background color for a QTableWidget but i amgetting it like this
But i want it to be same for the whole table and the font color for the items also to be changed to white . How can i do this ?
-
@mrjj and another doubt is that i want to have a tick mark in the menu item when it is pressed . whether it can be done or not ?
-
@ManiRon
Hi
You mean in a QMenu or in the QTableWidget ? -
@mrjj Its solved sir,
But facing a new one .
I have added a style sheet for a pushbutton
Stylesheet:
background-color: qradialgradient(spread:pad, cx:0.499807, cy:0.489, radius:0.8, fx:0.499, fy:0.488909, stop:0.0795455 rgba(0, 147, 185, 255), stop:1 rgba(50, 50, 50, 255));
border: 1px solid black;
border-radius: 8px;
color:white;But i want to highlight when its pressed but when i add that its not working is there any sequence i should follow?
-
Sir how to bring the pressed effect to a push button in QT when style sheet is added
-
@ManiRon
Hi
Its has a state for itQPushButton:pressed { background-color: qradialgradient(spread:pad, cx:0.499807, cy:0.489, radius:0.8, fx:0.499, fy:0.488909, stop:0.0795455 rgba(0, 147, 185, 255), stop:1 rgba(50, 50, 50, 255)); border: 1px solid black; border-radius: 8px; color:white; }
-
@mrjj i gave it sir but know change
QPushButton{background-color:qradialgradient(spread:pad, cx:0.499807, cy:0.489, radius:0.8, fx:0.499, fy:0.488909,stop:0.0795455 rgba(0, 147, 185, 255), stop:1 rgba(50, 50, 50, 255));
border: 1px solid black;
border-radius: 8px;
color:white;}QPushButton:hover:!pressed
{
background-color: qradialgradient(spread:pad, cx:0.499807, cy:0.489, radius:0.8, fx:0.499, fy:0.488909, stop:0.0795455 rgba(0, 150, 190, 255), stop:1 rgba(50, 50, 100, 255));
border: 2px solid black;
border-radius: 8px;
color:white;
} -
@ManiRon
Hi
Why use ! (not pressed ) ?
as that is same as normal ? -
@mrjj yes sir i removed it but i want an effect which all buttons have when pressed
-
For example when we press a button we feel like it goes inside and comes back like that effect i want
-
@ManiRon
Hi
to keep the pressed down effect, then only assign
background-color: do not change anything with border as that disabled the down effect.
Else you have to create such effect your self.
-
how can we create ? is there any way sir?
-
@ManiRon
Hi
You can use the
border-top-color
border-right-color
border-bottom-color
border-left-color
to draw the normal "3d" effect in both normal and pressed state
or use
border.image
http://doc.qt.io/qt-5/stylesheet-reference.html#border-image