LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-10-2007, 02:34 AM   #1
snjv
LQ Newbie
 
Registered: Apr 2007
Posts: 28

Rep: Reputation: 15
Template/example for simple 2d drawings in Qt


Hello,
I am new to Qt and have been searching for tutorials for drawing simple objects like lines, circles, arcs, etc using Qt. I would like to use Qt to display these through C++. I tried modifying various "Hello World" programs that compiled and opened windows with the messages, but whenever I tried QRect, etc., either I ended up with error messages or them not being drawn in the window. Web searching has not been useful as all the examples that I found are connected through some signals or part of some classes. Can someone give me a simple (starting) program to draw a circle or a line or a rectangle so that I can use it as a base for further extensions please?
TIA,
-S
 
Old 11-10-2007, 04:02 AM   #2
Peter_APIIT
Member
 
Registered: Dec 2006
Posts: 582

Rep: Reputation: 31
You can get it from QT documentation. There are tons of guide out there.

I never used QT before but this tools is extremely good compare to others.

I hope this help.
 
Old 11-10-2007, 06:27 AM   #3
Sinedie
Member
 
Registered: Nov 2006
Posts: 71

Rep: Reputation: 15
I too had gone through the documentation and it's a mountain. They also give examples, but they are not standalone or simple. For instance, if you look into the documentation of qimage, you'd see QRect, but it does not really tell you how to put the things on the window! It's all part of some class or part of code, etc. That's what is really frustrating.

Even more frustrating, and a bit infuirating part is that many of the available examples have something like, '#include <lib.h>'. Now we don't put that extra '.h' for reasons well known and when the compiler warns 'out of scope', it'll confuse like nothing else! Add to it the case-sensitivity and mistakes there of in the names of the header files! x(

Last edited by Sinedie; 11-10-2007 at 06:32 AM.
 
Old 11-10-2007, 07:33 AM   #4
Sinedie
Member
 
Registered: Nov 2006
Posts: 71

Rep: Reputation: 15
Finally found this. Hope it helps!

http://www.digitalfanatics.org/proje...chapter12.html
 
Old 11-11-2007, 12:12 AM   #5
snjv
LQ Newbie
 
Registered: Apr 2007
Posts: 28

Original Poster
Rep: Reputation: 15
Thumbs up

Thanks Sinedie. That was really helpful!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ template and sizeof dmail Programming 2 08-03-2006 09:01 AM
overloading a template allomeen Programming 1 01-26-2006 07:59 PM
Daemon Template thekonqueror Programming 0 08-15-2005 03:07 PM
Template class with a template member... Nicholas Bishop Programming 3 02-21-2005 09:27 PM
c++ template help ashirazi Programming 4 11-16-2004 09:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration