开发者

Is it possible to draw focus rect for whole QTableWidget row?

开发者 https://www.devze.com 2023-04-05 05:11 出处:网络
I have a QTableWidget simple table, which have many rows and columns. So, what I need, is to draw focus rect over the whole selected row, as QTreeView/QTreeWidget could do.

I have a QTableWidget simple table, which have many rows and columns. So, what I need, is to draw focus rect over the whole selected row, as QTreeView/QTreeWidget could do.

Is it possibl开发者_运维知识库e?

PS. As I could understand from the Qt qtablewidget.h sources, this feature does not realized...

Many thanks.


You could iterate all columns, get all QTableWidgetItems for your selected row and change the background color to blue.


You want to select the whole row? Use QAbstractItemView's selectionBehavior property.

0

精彩评论

暂无评论...
验证码 换一张
取 消