qt - How to change color of focus rectangle of items in QTreeView? -


is possible change color of dotted focus rectangle items (rows consisting of multiple qstandarditems) in qtreeview ?

in stylesheet qtreeview::item:focus not work

and can't reimplement paint function in custom qitemdelegate since overrides stylesheet settings.

thanks in advance

qtreeview::item:selected works me:

#include <qtgui>  int main(int argc, char *argv[]) {     qapplication app(argc, argv);      qfilesystemmodel model;     model.setrootpath(qdir::currentpath());     qtreeview tree;     tree.setmodel(&model);      tree.setallcolumnsshowfocus(true);      tree.setstylesheet("qtreeview::item:selected { border-color:green; "                        "border-style:outset; border-width:2px; color:black; }");      tree.show();     return app.exec(); } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -