[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Bug with QGraphicsTextItem in pagedesigner.pyw (Mark
From: Mark Summerfield <mark () qtrac ! eu>
Date: 2008-03-25 9:15:28
Message-ID: 200803250915.28470.mark () qtrac ! eu
[Download RAW message or body]
On 2008-03-23, alteo_gange wrote:
> Hi, all.
>
> Why the Mark Summerfield's script, pyqt/chap12/pagedesigner.pyw which is an
> file example of his book «Rapid Gui Programming With Python and Qt », bugs
> when i try to delete, rotate, copy, or cut any text (in fact
> QGraphicsTextItem)?
>
> example:
> Button «Add Text » >> enter text in the QTextEdit() of QDialog() >> Button
> «Ok »
>
> >> Button «Delete » >> «Delete 1 item? » >> Button «Yes » >> BUG! >>
>
> «QGraphicsScene::removeItem: item 0x85baa90's scene ((nil)) is different
> from this scene (0x8324f10)
> Erreur de segmentation (core dumped) »
>
> other example:
> Button «Add Pixmap » >> select image >> Button «Open » >> Button «Delete » >>
> No Problem
>
> Why there is a bug with texts and not with images?
> Yet texts and images are both provided to QGraphicsScene with respectively
> QGraphicsTextItem and QGraphicsPixmapItem which inherit of QGraphicsItem.
> Moreover, in theory, QGraphicsScene.removeItem(QGraphicsItem * item )
> can «removes the item item and all its children from the scene » (and
> «Delete » Button uses this method).
>
> I don't understand. Have you an idea?
This example works fine for me and I tested it on Linux (Fedora +
Kubuntu), Windows XP, and Mac OS X.
Which versions of PyQt, Qt, and Python are you using? What operating
system are you using? As I mention at the beginning of chapter 12, this
example needs PyQt 4.1 (ideally PyQt 4.2) or later and Qt 4.2 or later.
--
Mark Summerfield, Qtrac Ltd., www.qtrac.eu
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic