PDA

View Full Version : QTableView paint row in stylesheet hover



estanisgeyer
23rd May 2008, 15:22
Hi guys,

I have a QTableView with items from a result of a QSqlQueryModel. So far, so good, created a stylesheet so that when the mouse pointer was placed on an item, a color was painted. Running perfectly, but not found a way to make the entire line was painted in this case. There are as I do so with stylesheets?

Then my stylesheet:



QTableView::item:hover {
background-color: rgb(185, 210, 235);
}


See the picture below.
Thanks,

Marcelo Estanislau
Brazil

jpn
25th May 2008, 09:41
I'm afraid style sheets don't support that. You could send a suggestion to Trolltech.

Ashkan_s
22nd October 2012, 22:20
I have same problem, also asked in this thread http://www.qtcentre.org/threads/44792-Set-hover-style-for-entire-row-in-QTableView

If I want to extend Qt's style sheets, what I have to looking for? How and/or where I must start? Can anyone point me the direction? I have no idea.

Ashkan_s
23rd October 2012, 10:17
I have started by reading the source code of QWidget::setStyleSheet. Also took a look at qcssparser and qstylesheetstyle. What I realized is there are many Qt's private implementation involve in the process of setting a stylesheet. I think choosing another way to solve my problem will be much easier.