Qt Forum - programming with C++ and Qt
Register Calendar Members List Team Members Search Frequently Asked Questions Go to the Main Page

Qt Forum - programming with C++ and Qt » QtForum.org » Qt » Qt Programming » codes to draw nodes and lines » Hello Guest [Login|Register]
Last Post | First Unread Post Print Page | Recommend to a Friend | Add Thread to Favorites
Post New Thread Post Reply
Go to the bottom of this page codes to draw nodes and lines
Author
Post « Previous Thread | Next Thread »
jkelly jkelly is a female
Assistant


Registration Date: 05.05.2008
Posts: 6
Location: singapore

Level: 4 [?]
Experience: 70
Next Level: 100

30 points of experience needed for next level

smile codes to draw nodes and lines Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

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 jkelly is offline Send an Email to jkelly Search for Posts by jkelly Add jkelly to your Buddy List
stinny stinny is a male
Software Engineer


Registration Date: 09.04.2008
Posts: 26
Location: Prague

Level: 9 [?]
Experience: 965
Next Level: 1,000

35 points of experience needed for next level

RE: codes to draw nodes and lines Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

QGraphicsScene is here for You.
07.05.2008 12:37 stinny is offline Send an Email to stinny Search for Posts by stinny Add stinny to your Buddy List
jkelly jkelly is a female
Assistant


Registration Date: 05.05.2008
Posts: 6
Location: singapore

Level: 4 [?]
Experience: 70
Next Level: 100

30 points of experience needed for next level

Thread Starter Thread Started by jkelly
Fragezeichen Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

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 jkelly is offline Send an Email to jkelly Search for Posts by jkelly Add jkelly to your Buddy List
Nicolas SOUCHON
Wizard


Registration Date: 27.06.2007
Posts: 726

Level: 29 [?]
Experience: 235,499
Next Level: 242,754

7,255 points of experience needed for next level

Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

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 Nicolas SOUCHON is online Send an Email to Nicolas SOUCHON Search for Posts by Nicolas SOUCHON Add Nicolas SOUCHON to your Buddy List
Tree Structure | Board Structure
Jump to:
Post New Thread Post Reply
Qt Forum - programming with C++ and Qt » QtForum.org » Qt » Qt Programming » codes to draw nodes and lines

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

Branchenbuch Österreich - Branchenbuch Niederlande - Portugal Branchenverzeichnis - Spanien Branchenverzeichnis 
Telefonbuch - Branchenbuch Frankreich