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
Post a Comment