PDA

View Full Version : problem with displaing graphs on a Qt canvas



Michał Nowotka
27th March 2010, 20:00
Hello,
Lets say I'm a newbie.
I want a good Qt library for displaying simple graphs. I've found quanava library. But there is a problem. When i compiled basic example it looks like graph edges are not painted properly when moving nodes. I don't have any idea where is a bug but this code seems to be rather simple. I think this is a problem with paint method in NodeItem class. Maybe someone has already solved this problem because this library is quite popular.

Lykurg
27th March 2010, 20:07
I don't know quanava, but did you notice http://qwt.sourceforge.net/?

Michał Nowotka
27th March 2010, 20:20
In QWT homepage in screenshots i don't see any graphs (I mean graphs in mathematical sense eg. G=(E,V)). I want to be able to operate in terms of graph theory so I wans to define set of vertilces, edges, be able to define directed or undirected graph etc.

Michał Nowotka
27th March 2010, 20:55
Ok, I've got some clue. When I zoom graph view then edges are displayed properly.
So what QGraphicsItem method is fired when zooming (and on Windows also restoring window) and what when dragging and wtat's the difference?