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