Home > other >  How to set the color line in the QlistView
How to set the color line in the QlistView

Time:09-18

After the mouse click to select a QlistView, default is blue, how to set their own custom color

CodePudding user response:

There is "setStyleSheet function to add selection - background color: rgba (0,0,0,20); Selection - color: white; Specific code is as follows:
Lisetview - & gt; SetStyleSheet (" QlistView {selection - background color: rgba (0,0,0,20); Selection - color: white; } ");
Selection - background color is to select the background color in
Selection - color is the color of the selected font
  • Related