[PyQt] upgrade to ubuntu 10.04 -- problem with graphics (solved)
Preisig, Heinz A
Heinz.Preisig at ChemEng.NTNU.NO
Thu Sep 9 15:43:26 BST 2010
Seems the problem is solved for now.
I searched for a couple of days and came to no conclusion. The task
crashed after having left "itemChange" in the next execution call. As
mentioned running it in the debugger inside Eclipse did not result any
error message. Running it from the terminal it gave segmentation fault.
One problem disappeared when setting the flag ItemSendsGeometryChanges
as David suggested. Then I could move the objects again. However it
crashed on another operation. Again the segmentation fault. Comparing my
rather old code with the elasticnode example code I found that I had not
set the index method (setItemIndexMethod) to NoIndex. Adding the flag,
did the trick.
Maybe this was a default before?
Heinz
PS I attach the modified code of the elasticnodes example. Not sure
anymore where I took it from, but if I am not mistaken from the
riverbankcomputing domain.
On 09/05/2010 08:32 AM, Preisig, Heinz A wrote:
> Thanks for the help. I shall modify the code and look at the example
> too. I also decided to re-install. Shall report on results.
>
> Cheers,
> Heinz
>
> On 09/04/2010 03:30 PM, David Boddie wrote:
>> On Sat Sep 4 08:00:06 BST 2010, Preisig, Heinz A wrote:
>>
>>
>>> After upgrading Ubuntu 9.10 to 10.04 I encounter some problems with
>>> running a graphics application I built last year. It uses the mechanisms
>>> described in the example "elasticnodes". The two application represent a
>>> graph, which when moving the nodes also update the location of the arcs.
>>>
>>> In both cases the arcs are not updated. In fact the example does not
>>> show the arcs when starting it. My application does show the arcs, but
>>> it does not update. I dug for some hours in the code, but could not find
>>> a problem. It seems it does not get into the "itemChange" method of the
>>> "QGraphicsItem" class. Some manipulations resulted in abortion of the
>>> task, which when running from within Eclipse did not produce an error
>>> message. From the terminal I got an occasional segmentation fault.
>>>
>> I don't know why you are getting segmentation faults, but the problem with
>> the itemChange method is due to a change in behaviour in Qt 4.6. You now
>> need to call the item's setFlag method with the ItemSendsGeometryChanges
>> flag to get notifications when items move.
>>
>> David
>> _______________________________________________
>> PyQt mailing listPyQt at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>
>
> --
>
>
> Heinz A Preisig
> Professor of Process Systems Engineering Private:
> Øvre Bakklandet 62 B, 7013 Trondheim, Norway
> Department of Chemical Engineering
> Norwegian University of Science and Technology
> N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
> Tel mob: +47 9754 1334
> e-mail: Heinz.Preisig at chemeng.ntnu.no
> <mailto:Heinz.Preisig at chemeng.ntnu.no>
> web: www.chemeng.ntnu.no\~preisig <http://www.chemeng.ntnu.no/%7Epreisig>
>
>
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
--
Heinz A Preisig
Professor of Process Systems Engineering Private:
Øvre Bakklandet 62 B, 7013 Trondheim, Norway
Department of Chemical Engineering
Norwegian University of Science and Technology
N -- 7491 Trondheim, Norway Tel direct: +47 735 92807
Tel mob: +47 9754 1334
e-mail: Heinz.Preisig at chemeng.ntnu.no <mailto:Heinz.Preisig at chemeng.ntnu.no>
web: www.chemeng.ntnu.no\~preisig <http://www.chemeng.ntnu.no/%7Epreisig>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100909/930cb1ca/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: elasticnodes_2010.py
Type: text/x-python
Size: 13802 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100909/930cb1ca/attachment-0001.py>
More information about the PyQt
mailing list