Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ruby Desktop Apps with Qt
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
ynonperek
June 25, 2012
Technology
1
620
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
290
QtRuby In Action
ynonperek
1
170
Cool CPAN Modules
ynonperek
2
640
Advanced Perl Moose
ynonperek
4
2.7k
Perl Golf
ynonperek
4
2.2k
git
ynonperek
3
830
Concurrency In Qt Applications
ynonperek
1
360
Moose Design Patterns
ynonperek
4
600
Other Decks in Technology
See All in Technology
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
380
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
390
StrandsとNeptuneを使ってナレッジグラフを構築する
yakumo
1
120
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
240
今こそ学びたいKubernetesネットワーク ~CNIが繋ぐNWとプラットフォームの「フラッと」な対話
logica0419
3
290
今日から始めるAmazon Bedrock AgentCore
har1101
4
420
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
330
Tebiki Engineering Team Deck
tebiki
0
24k
クレジットカード決済基盤を支えるSRE - 厳格な監査とSRE運用の両立 (SRE Kaigi 2026)
capytan
6
2.8k
【Ubie】AIを活用した広告アセット「爆速」生成事例 | AI_Ops_Community_Vol.2
yoshiki_0316
1
120
FinTech SREのAWSサービス活用/Leveraging AWS Services in FinTech SRE
maaaato
0
130
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
120
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
Visualization
eitanlees
150
17k
[SF Ruby Conf 2025] Rails X
palkan
1
760
The Language of Interfaces
destraynor
162
26k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Curse of the Amulet
leimatthew05
1
8.7k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
440
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Technical Leadership for Architectural Decision Making
baasie
2
250
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