1

I am working on a custom control box (that min,max/restore/close button in the top right of your Windows titlebar) for my new application. I use closeIcon = style.standardIcon(QStyle.SP_TitleBarCloseButton) to get the correct icon for them. See the full code here in my other SO question. What I got is a black icon. In which I need the white version when it's in hover state. should be white

Can we .. I don't know, inverse it? Or should I get another icon from QStyle?

Community
  • 1
  • 1
swdev
  • 4,997
  • 8
  • 64
  • 106

1 Answers1

0

This question (and several others) are from the intention of creating a chrome like tab in PyQt application, by hiding the titlebar and reimplementing control box. But it didn't gives the best result. Right now this is my solution to create a chrome like tab in PyQt application. Therefore, I close this question.

Community
  • 1
  • 1
swdev
  • 4,997
  • 8
  • 64
  • 106
  • By the way, for this particular case, I simply create two version of icons: black and white. And creating a new pushbutton class, that specifically override `enterEvent` and `leaveEvent`. In there, I switch the active icon using `setIcon` to appropriate black/white icon – swdev Jul 06 '14 at 06:44