I'm using a QTreeView with a custom model. In my application I have a
menu item that adds a new element to the model, fills it with default
data (e.g. "New Item"), then edits it in the tree view so the user can
type in the value they want.
This all works fine except that 1-2 seconds after I ca
On Thu, 05 Jan 2012 15:28:13 +0100, Gerard Vermeulen
wrote:
> Hi,
>
> I would like to use QPainter as QMutexLocker in a with-statement, but:
>
> >>> pixmap = Qt.QPixmap(200, 200)
> >>> with Qt.QPainter(pixmap) as painter:
> ... painter.drawLine(0, 0, 200, 200)
> ...
> Traceback (most recent c
Hi,
I would like to use QPainter as QMutexLocker in a with-statement, but:
>>> pixmap = Qt.QPixmap(200, 200)
>>> with Qt.QPainter(pixmap) as painter:
... painter.drawLine(0, 0, 200, 200)
...
Traceback (most recent call last):
File "", line 1, in
AttributeError: __exit__
>>>
Gerard
Am 04.01.2012 um 20:04 schrieb Phil Thompson:
> On Wed, 4 Jan 2012 19:46:45 +0100, Detlev Offenbach
> wrote:
>> Hello,
>>
>> does anybody have experience in gesture programming with PyQt? I am
> trying
>> to program a custom gesture recognizer, but registering it with
>> QGestureRecognizer.regi
You should make the upper part of your GUI (what looks like to be a graph) grow
(see QSizePolicy).
--
François
- Mail original -
De: "Fabien Lafont"
À: pyqt@riverbankcomputing.com
Envoyé: Jeudi 5 Janvier 2012 11:47:08
Objet: [PyQt] How to fix the size of a widget?
Is it possible to
Thanks a lot, it works!
2012/1/5 :
> Hi Fabien,
>
> I think you'll need a QLabel instance :
>
> led = QLabel()
> led.setPixmap(QPixmap("LED_ON.PNG")
>
> Should do the job.
>
> Cheers,
>
> --
> François
>
>
>
> - Mail original -
> De: "Fabien Lafont"
> À: pyqt@riverbankcomputing.com
Hi Fabien,
I think you'll need a QLabel instance :
led = QLabel()
led.setPixmap(QPixmap("LED_ON.PNG")
Should do the job.
Cheers,
--
François
- Mail original -
De: "Fabien Lafont"
À: pyqt@riverbankcomputing.com
Envoyé: Jeudi 5 Janvier 2012 10:57:18
Objet: [PyQt] How to ins
On Thu, 2012-01-05 at 10:57 +0100, Fabien Lafont wrote:
> Hello,
>
> I'm trying to insert a picture in PyQt. I've tried
>
> LED = QLabel.setPixmap(QPixmap("LED_ON.PNG"))
>
> but it returns:
>
> LED = QLabel.setPixmap(QPixmap("LED_ON.PNG"))
> TypeError: QLabel.setPixmap(QPixmap): first argument
Hello,
I'm trying to insert a picture in PyQt. I've tried
LED = QLabel.setPixmap(QPixmap("LED_ON.PNG"))
but it returns:
LED = QLabel.setPixmap(QPixmap("LED_ON.PNG"))
TypeError: QLabel.setPixmap(QPixmap): first argument of unbound method
must have type 'QLabel'
Any Idea?
___