Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
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.. ..
RE: codes to draw nodes and lines
QGraphicsScene is here for You.
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.. ..
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