Archive:Development/Tutorials/Qt4 Ruby Tutorial (zh TW)

From KDE TechBase
Revision as of 15:33, 23 June 2013 by AnneW (talk | contribs) (AnneW moved page Development/Tutorials/Qt4 Ruby Tutorial (zh TW) to Archive:Development/Tutorials/Qt4 Ruby Tutorial (zh TW) without leaving a redirect: Obsolete)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Template:I18n/Language Navigation Bar (zh TW) 作者:Darshan Ishaya, [email protected]

原文鏈接:http://www.darshancomputing.com/qt4-qtruby-tutorial/

Qt®4 Ruby 教學

本教學介紹使用 QtRubyqt4-qtruby 的 GUI 程式設計。這不過是 Nokia 優秀的Qt 教學簡單移植。 因此,本段後的大多數文字直接來自他們的教學。我有必要修改,使之適合 Ruby 綁定。並重新安排或改寫一些部分,使他們(我希望)更清晰點。

本教學並不包括一切,其重點放在傳授 GUI 程式的設計哲學,和必要的 Qt 功能介紹。一些較為一般的特色可能不會在本教學中被提及。

第一章由最小的「Hello World」程式開頭,並於接下來的每一章介紹新的概念。到第14章,第1章的「Hello World」程式將變成448行的遊戲。

如果您對 Qt 是完全陌生的,您可能需要閱讀如何學習 Qt。請記住,和大多數 Qt 相關的文件一樣,這是非常 C++ 導向的。

目錄

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

這個小遊戲看起來並沒有那麼像一個時髦的 GUI 應用程式。雖然它使用了一些 GUI 技術,不過在你開始使用它之後,我們建議你試試這個 Application 範例,它提供了一個擁有選單、工具列、一個狀態列等等的小型 GUI 應用程式。這裡有不少很有教育意義的範例。他們都是用 C++ 寫成的,但很容易跟進。因為這一點,證明他們是 Qt 的使用說明,而不是 C++ 功能。