Unsolved QTablewidget insert check box and do alot
-
Hi
You can do
ui->tableWidget->horizontalHeader()->setSectionResizeMode (QHeaderView::Fixed);
so they are not adjustable at runtime. -
Sir i want to create an action log wi=hich should be editable at runtime means it should be like this in application
we can drag up or down this action log similarly i want to create can we create like that?
-
Hi
The http://doc.qt.io/qt-5/qsplitter.html#details
allows to drag and change size allocated to the widget on both sides of it.
That could be used to make similar feature. -
@mrjj we can drag it up and down if we use splitter?
-
@ManiRon
Yes that is what the splitter does. its allows you to drag the splitter
and give more or less space to the widgets it controls.To fast try it out.
Place any 2 widget on a form. then select both and
then right clik. Now in Layout menu there is option to
insert splitter between them. -
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?