Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
    def closeEvent(self, event):
        try: # try to delete self object in the cp.confpars
            del cp.confpars.guiconfigparameters 
        except # AttributeError:
            pass # silently ignore

Change style of

...

buttons depending on status

For particular QPushButton it works:

Code Block
self.but_path = QtGui.QPushButton('File:')
self.but_path.setObjectName('but_path')
self.but_path.setStyleSheet('QPushButton#but_path:pressed  {color: black; background-color: green;}' +
                                    'QPushButton#but_path:disabled {color: white; background-color: pink;}' +
                            'QPushButton        'QPushButton           {color:  blue; background-color: yellow;}')

For entire application it should be like:

code
Code Block

app    = QtGui.QApplication.instance()
app.setStyleSheet('QLabel{color:  blue#fff;} QPushButton{background-color: yellow#000; color: #fff}')

but does not work for me...

Matplotlib

In examples below we assume

...