How to set style "font-family" for selected row in QTableView?
-
Hello,
can anybody help me please? How can I set style for font-family for selected item in QTreeView/QTableView?
Trying:
QTreeView::item:selected { font-familly: ....; font-size: ...; }
QTableView::item:selected { font-familly: ....; font-size: ...; }Thanks,
David. -
Hi
If you right click your Treeview, there is CSS editor
(if u use UI files)Have u tried with
{ font: 16pt "Segoe UI Emoji"; } -
Thank you.
But no UI no Creator, all styles are in *.qss file.
Please see:
Working properly:
QTreeView::item:selected { border: 0px; color: blue; background-color: red; }Font is not change for selected item only color is...
QTreeView::item:selected { border: 0px; color: blue; background-color: red; font-size: 13px; font-family: Lato;}Regards.
-
@David.Reznicek
Hi
Im not sure
QTreeView::item:selected accept font
http://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtreeview -
Thank you for you time, I know about this site. I was hoping exists some solution....
-
@David.Reznicek
Hi
Well you can always use a delegate and do the drawing yourself.
This also seems to work.
http://stackoverflow.com/questions/13413156/qt-stylesheet-for-a-qtreeview -
@David.Reznicek
please use the forum search before posting, this question has been asked multiple times already.
For example this.