Wednesday 15 June 2011

python - PyQt4 - Making a QIcon look active or "pressed down" -


I have QMainWindow a toolbar in which QIcon is a group of buttons, clicking these buttons will switch between widgets in a QStackedWidget Actually, buttons work as tabs, open different parts of the program. Now, what I want to do is press a special button when the corresponding widget is activated, so it is easy to see which part of the program is active like this:

I'm starting it again in 20 different ways while googling and checked out but I'm still a loss I'm obviously missing out on some pain here in

Of course I was missing some clearly: P is the solution here: < Make pre-> # button and check it as self.testButton = QtGui.QAction (QtGui.QIcon ('images / icons / test.png'), 'Test', manually). Self.testButton.setCheckable (True) # Checked Button Button button as its own. Button check (true)

No comments:

Post a Comment