Difference between revisions of "Development/Tutorials/Qt4 Ruby Tutorial"

Jump to: navigation, search
Line 9: Line 9:
 
[http://rubyforge.org/projects/korundum/ qt4-qtruby].
 
[http://rubyforge.org/projects/korundum/ qt4-qtruby].
 
It is simply a port of Nokia's fine  
 
It is simply a port of Nokia's fine  
[http://doc.qt.nokia.com/latest/tutorials.html Qt Tutorial].
+
[http://doc.qt.nokia.com//4.2/tutorial.html Qt Tutorial].
 
Therefore, most of the text after this paragraph comes straight from their tutorial.  I have modified it as necessary to make it make sense with the Ruby bindings, and have rearranged or rewritten a few parts to make them (I hope) a bit clearer.
 
Therefore, most of the text after this paragraph comes straight from their tutorial.  I have modified it as necessary to make it make sense with the Ruby bindings, and have rearranged or rewritten a few parts to make them (I hope) a bit clearer.
  
Line 17: Line 17:
  
 
If you're completely new to Qt, you might want to read [http://doc.qt.nokia.com/latest/how-to-learn-qt.html How to Learn Qt] if you haven't already done so. Keep in mind that like most documents about Qt, it is very C++ oriented.  
 
If you're completely new to Qt, you might want to read [http://doc.qt.nokia.com/latest/how-to-learn-qt.html How to Learn Qt] if you haven't already done so. Keep in mind that like most documents about Qt, it is very C++ oriented.  
 +
 +
==Table of Contents==
 +
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 01|Hello World!]]
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 2|Calling it Quits]]
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 3|Family Values]] (unfinished)
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 4|Let There Be Widgets]] (unfinished)
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 5|Building Blocks]] (unfinished)
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 6|Building Blocks Galore!]] (unfinished)
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 7|One Thing Leads to Another]] (unfinished)
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 8|Preparing for Battle]] (unfinished)
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 9|With Cannon You Can]] (unfinished)
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 10|Smooth as Silk]] (unfinished)
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 11|Giving It a Shot]] (unfinished)
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 12|Hanging in the Air the Way Bricks Don't]] (unfinished)
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 13|Game Over]] (unfinished)
 +
#[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 14|Facing the Wall]] (unfinished)
 +
 +
This little game doesn't look much like a modern GUI application. It uses some GUI techniques, but after you've worked through it, I recommend checking out the [http://doc.qt.nokia.com/latest/mainwindows-application.html Application] example, which presents a small GUI application with menus, tool bars, a status bar, and so on. There are quite a few very educational [http://oc.qt.nokia.com/latest/examples.html Examples]. They are all written in C++, but are easy enough to follow since the point of them is to demonstrate usage of the Qt library, not C++ features.
  
 
Right now this tutorial is hosted on my site.  I am going to be bringing it over here over the next week or so.
 
Right now this tutorial is hosted on my site.  I am going to be bringing it over here over the next week or so.
Line 25: Line 44:
  
 
until it is fully transferred over to this wiki.
 
until it is fully transferred over to this wiki.
 
==Table of Contents==
 
[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 01|Chapter 1]]
 
 
[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 2|Chapter 2]]
 
 
[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 3|Chapter 3]] (unfinished)
 
 
[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 4|Chapter 4]] (unfinished)
 
 
[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 5|Chapter 5]] (unfinished)
 
  
 
[[Category:Ruby]]
 
[[Category:Ruby]]

Revision as of 12:33, 20 December 2009


Development/Tutorials/Qt4 Ruby Tutorial

Author: Darshan Ishaya, qt-tutorial@darshancomputing.com

Qt®4 Tutorial for Ruby

This tutorial gives an introduction to GUI programming using the Qt toolkit, Ruby, and qt4-qtruby. It is simply a port of Nokia's fine Qt Tutorial. Therefore, most of the text after this paragraph comes straight from their tutorial. I have modified it as necessary to make it make sense with the Ruby bindings, and have rearranged or rewritten a few parts to make them (I hope) a bit clearer.

This tutorial doesn't cover everything; the emphasis is on teaching the programming philosophy of GUI programming, and Qt's features are introduced as needed. Some commonly used features are never used in this tutorial.

Chapter one starts with a minimal "Hello world" program and the following chapters introduce new concepts. By Chapter 14, the "Hello world" program from Chapter 1 will have turned into a 448-line game.

If you're completely new to Qt, you might want to read How to Learn Qt if you haven't already done so. Keep in mind that like most documents about Qt, it is very C++ oriented.

Table of Contents

  1. Hello World!
  2. Calling it Quits
  3. Family Values (unfinished)
  4. Let There Be Widgets (unfinished)
  5. Building Blocks (unfinished)
  6. Building Blocks Galore! (unfinished)
  7. One Thing Leads to Another (unfinished)
  8. Preparing for Battle (unfinished)
  9. With Cannon You Can (unfinished)
  10. Smooth as Silk (unfinished)
  11. Giving It a Shot (unfinished)
  12. Hanging in the Air the Way Bricks Don't (unfinished)
  13. Game Over (unfinished)
  14. Facing the Wall (unfinished)

This little game doesn't look much like a modern GUI application. It uses some GUI techniques, but after you've worked through it, I recommend checking out the Application example, which presents a small GUI application with menus, tool bars, a status bar, and so on. There are quite a few very educational Examples. They are all written in C++, but are easy enough to follow since the point of them is to demonstrate usage of the Qt library, not C++ features.

Right now this tutorial is hosted on my site. I am going to be bringing it over here over the next week or so.

You can currently access this tutorial at the following address:

http://www.darshancomputing.com/qt4-qtruby-tutorial/

until it is fully transferred over to this wiki.


KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal