I'm trying to display an image as part of a qtreewidgetitem. Figured I'd
use setIcon and then resize it but when I run this bit of code:
icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(thumbnailPath),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
reportUI.setIcon(0, icon)
reportUI.setIconSize(0, QtCore.QSize(240, 120))
I get this error:
Traceback (most recent call last):
File "Z:\_USERS\Christian\work\odTools\src\odToolsDlg.py", line 1982,
in on_report_CreateButton_clicked
reportUI.setIconSize(0, QtCore.QSize(240, 120))
AttributeError: setIconSize
I believe this should be valid, any ideas? Or is there a way to display
an image in a qtreewidget?
Christian
Iliya Gogolev wrote:
Took from Qt API 4.4:
A command button is rectangular and typically displays a text label
describing its action. A shortcut key can be specified by preceding the
preferred character with an ampersand in the text. For example:
QPushButton *button = new QPushButton("&Download", this);
In this example the shortcut is Alt+D. See the QShortcut documentation for
details (to display an actual ampersand, use '&&').
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Christian Aubert
Sent: Thursday, November 27, 2008 3:27 AM
To: [email protected]
Subject: [PyQt] Intro and question
Hi everyone,
Thanks to Mark for telling me about the list. I got started with pyqt
about 3 months ago, love the functionality, hope to be able to
contribute here.
I have a GUI using a QPushButton, does anyone know of a way to use
modifiers on buttons (CTRL, ALT, Right-click)?
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt