On Fri, 16 Jan 2004, claude.faath wrote:
> self.fileOpen = QToolButton(QPixmap(fileopen), 'Open File', 'Opens a new
> file', self.open, \
> toolBar, 'Open file')
> self.fileSave = QToolButton(QPixmap(filesave), 'Save File', 'Saves current
> file', self.save, \
> toolBar, 'Save file')
>
> self.addToolBar(toolBar, "Main toolbar")
I replaced the above lines with the following ones:
self.fileOpen = QToolButton(QIconSet(QPixmap(fileopen)),
'Open File',
'Opens a new file', self.open,
toolBar, 'Open file')
self.fileSave = QToolButton(QIconSet(QPixmap(filesave)),
'Save File',
'Saves current file', self.save,
toolBar, 'Save file')
#self.addToolBar(toolBar, "Main toolbar")
self.addDockWindow(toolBar, "Main toolbar")
And things work fine :)
The constructor to QToolButton takes a QIconSet as first argument, not a
QPixMap (at least in QT 3.2.1, which is what I'm running).
>From the documentation:
QToolButton ( const�QIconSet�&�iconSet, const�QString�&�textLabel,
const�QString�&�grouptext, QObject�*�receiver,
const�char�*�slot, QToolBar�*�parent, const�char�*�name = 0 )
Your problem could of course be another, given different versions if QT (I
haven't checked if this particular constructor has changed recently), but
a good guess is that this is it.
/micke
_______________________________________________
PyKDE mailing list [EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde