View Full Version : Border around selected cell in qtablewidget...
pyqt123
13th January 2010, 09:20
Is there anyway that i can change the border around the selected cell in qtablewidget.. Whenever i select i find a dotted line border around the selected cell. I want to make this border to disappear.. Is there a way???
jpujolf
14th January 2010, 08:42
Try using stylesheets :
qApp->setStyleSheet ( qApp->styleSheet() +" QTableWidget::item:focus { background-color:transparent; color:blue; border: 0px }" );
This will change the aspect of ALL QTableWidget on your appliaction. If you want to change only one, you can set it's stylesheet. ( a method of QWidget ).
sanket.mehta
6th September 2010, 12:14
HI,
I have a tablewidget in my application in which first column contains checkboxes and other contains information.
Now I want to set the background color of the selected row as transparent and a solid border around the row.
and when I check the check box in a particular row It will have background color as default and no border around the row.
Can you please help me?
Thanks in advance.
Sanket
vrushalid
16th July 2012, 11:43
Hi All,
I want to select the cell dynamically and change its border color to red. I tried the above method, but it didnt work. am I missing something?
jpujolf
16th July 2012, 13:55
Hi All,
I want to select the cell dynamically and change its border color to red. I tried the above method, but it didnt work. am I missing something?
Yes. The above method *ONLY* allows you to set cell's properties, but does not select anything...
Take a look at selection model API, to select a cell programatically.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.