|
 |
codes to draw nodes and lines |
jkelly

Assistant
Registration Date: 05.05.2008
Posts: 6
Location: singapore
Level: 4 [?]
Experience: 70
Next Level: 100
 |
|
codes to draw nodes and lines |
 |
hi, is there any code to draw nodes and lines using QT3? i need a simple GUI with 3 nodes connected to each other by lines.
thanks
__________________ please help me, i'm only a student.. ..
|
|
07.05.2008 03:43 |
|
|
stinny
Software Engineer
 
Registration Date: 09.04.2008
Posts: 26
Location: Prague
Level: 9 [?]
Experience: 965
Next Level: 1,000
 |
|
| RE: codes to draw nodes and lines |
 |
QGraphicsScene is here for You.
|
|
07.05.2008 12:37 |
|
|
jkelly

Assistant
Registration Date: 05.05.2008
Posts: 6
Location: singapore
Level: 4 [?]
Experience: 70
Next Level: 100
Thread Starter
 |
|
hi, what is QGraphicsScene? How do i use it? is that any sample codes for me to see? i need to draw a line first.
thanks
__________________ please help me, i'm only a student.. ..
|
|
08.05.2008 10:30 |
|
|
Nicolas SOUCHON
Wizard
  
Registration Date: 27.06.2007
Posts: 726
Level: 29 [?]
Experience: 235,499
Next Level: 242,754
 |
|
create a QGraphicsScene
create a QGraphicsView
attach it to the scene
create a QGraphicsLineItem
add it to the scene
create a node (QGraphicsRectItem, QGraphicsEllipseItem, or what you want)
give him the line item as parentItem
position it at the end of the line item
...
have a look at examples/graphicsview/... examples
and QGraphics* classes documentation
__________________ Nicolas
|
|
08.05.2008 11:01 |
|
|
|
|
|
 |
views today: 9.790 | views yesterday: 17.520 | total views: 10.243.159
Klebekork Shop - Linux Shop - Kontaktanzeigen - Linux Forum -
SMS Gewinnspiel -
Hotels -
Stadtpläne -
Branchenbuch & Stadtplan
|