Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ruby Desktop Apps with Qt
Search
ynonperek
June 25, 2012
Technology
1
600
Ruby Desktop Apps with Qt
Writing desktop applications using ruby and Qt
ynonperek
June 25, 2012
Tweet
Share
More Decks by ynonperek
See All by ynonperek
QtRuby for Qt Developers
ynonperek
0
320
Qt Hybrid Apps
ynonperek
1
270
QtRuby In Action
ynonperek
1
170
Cool CPAN Modules
ynonperek
2
630
Advanced Perl Moose
ynonperek
4
2.7k
Perl Golf
ynonperek
4
2.1k
git
ynonperek
3
820
Concurrency In Qt Applications
ynonperek
1
310
Moose Design Patterns
ynonperek
4
580
Other Decks in Technology
See All in Technology
Python 3.14 Overview
lycorptech_jp
PRO
1
120
AIプラットフォームにおけるMLflowの利用について
lycorptech_jp
PRO
1
170
まだ間に合う! Agentic AI on AWSの現在地をやさしく一挙おさらい
minorun365
11
480
生成AI活用の型ハンズオン〜顧客課題起点で設計する7つのステップ
yushin_n
0
240
AWS CLIの新しい認証情報設定方法aws loginコマンドの実態
wkm2
6
750
30分であなたをOmniのファンにしてみせます~分析画面のクリック操作をそのままコード化できるAI-ReadyなBIツール~
sagara
0
180
Fashion×AI「似合う」を届けるためのWEARのAI戦略
zozotech
PRO
2
850
Oracle Cloud Infrastructure IaaS 新機能アップデート 2025/09 - 2025/11
oracle4engineer
PRO
0
160
Lambdaの常識はどう変わる?!re:Invent 2025 before after
iwatatomoya
1
630
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
ディメンショナルモデリングを支えるData Vaultについて
10xinc
1
110
Strands Agents × インタリーブ思考 で変わるAIエージェント設計 / Strands Agents x Interleaved Thinking AI Agents
takanorig
2
190
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
5.7k
Typedesign – Prime Four
hannesfritz
42
2.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Building Adaptive Systems
keathley
44
2.9k
The Invisible Side of Design
smashingmag
302
51k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Navigating Team Friction
lara
191
16k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.3k
Transcript
Back To The Desktop Ynon Perek http://qtcollege.co.il Monday, June 25,
12
WHY ? Monday, June 25, 12
Desktop Apps • Office • Web Browser • Skype •
IDE • Torrent / FTP Client Monday, June 25, 12
So You Want To Write A Ruby Desktop App ...
Monday, June 25, 12
Mature and Widely Used • Choosing a widely used framework
ensures that you won’t run into bumps when scaling up • Choosing a framework with future ensures it won’t suddenly disappear Monday, June 25, 12
Cross Platform • The more the better • Code once,
look good everywhere Monday, June 25, 12
Cross Platform Monday, June 25, 12
Cross Language • C++ • Java • Ruby • Perl
• Python Monday, June 25, 12
Good UI Designer Monday, June 25, 12
Choose Qt • Cross Platform • Cross Languages • Awesome
Tools • Here To Stay Monday, June 25, 12
Famous Qt Apps • Skype • Google Earth • KDE
• KOffice • VLC • PhantomJS Monday, June 25, 12
QtRuby In Action • Installation • UI Design • Add
Actions • Use Stock Dialogs • Code: http://github.com/ynonp/ ruby-underground-talk Monday, June 25, 12
Installation: Windows gem install qtbindings Monday, June 25, 12
Installation: Mac/Linux • Install Qt SDK from Nokia • gem
install qtbindings • Details: https://github.com/ryanmelt/ qtbindings Monday, June 25, 12
Hello QtRuby 1 require 'Qt' 2 3 app = Qt::Application.new
( ARGV ) 4 5 b = Qt::PushButton.new( "DIE ALL HUMANS" ) 6 b.connect ( SIGNAL :clicked ) { app.exit } 7 8 b.show 9 app.exec 10 Monday, June 25, 12
Signals & Slots • Signals are Semantic Events • Slots
are handlers (methods or blocks) • signal -----> slot Monday, June 25, 12
Object Trees • Each Qt::Widget may contain other widgets •
Pass a container (parent) to initialize • Use layouts to determine ordering Monday, June 25, 12
No Layout 1 require 'Qt' 2 3 app = Qt::Application.new
( ARGV ) 4 5 w = Qt::Widget.new 6 b = Qt::PushButton.new( "Ouch! That hurt" , w) 7 c = Qt::PushButton.new("9", w) 8 9 w.show 10 11 app.exec 12 Monday, June 25, 12
With Layout 1 require 'Qt' 2 3 app = Qt::Application.new
( ARGV ) 4 5 w = Qt::Widget.new 6 7 b = Qt::PushButton.new( "Ouch! That hurt") 8 c = Qt::PushButton.new("9") 9 10 l = Qt::VBoxLayout.new( w ) 11 l.addWidget ( b ) 12 l.addWidget ( c ) 13 14 w.show 15 16 app.exec 17 Monday, June 25, 12
Monday, June 25, 12
UI Design • Run Qt Designer • Make GUI •
Save as .ui file • Convert to ruby with: rbuic4 file.ui -x -o file_ui.rb Monday, June 25, 12
Nested Layouts Combine different layout managers to make the layout
on the right Monday, June 25, 12
Add Actions • Connect actions with • obj.connect ( SIGNAL
:sig ) { action } Monday, June 25, 12
Use Stock Dialogs • Qt::MessageBox.about • Qt::FileDialog.get_open_file_name • Qt::FileDialog.get_save_file_name Monday,
June 25, 12
QtRuby First App • Rapid UI with Designer • Easy
layouts with Qt’s Layout Managers • Extensive library of Widgets and Stock Dialogs Monday, June 25, 12
Add Some Color • Use css-like style sheets to style
your app • Syntax: http://qt-project.org/ doc/qt-4.8/stylesheet- syntax.html Monday, June 25, 12
Happy Coding ! • Ynon Perek • http://qtcollege.co.il •
[email protected]
Monday, June 25, 12