$30 off During Our Annual Pro Sale. View Details »
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
310
Qt Hybrid Apps
ynonperek
1
270
QtRuby In Action
ynonperek
1
160
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
300
Moose Design Patterns
ynonperek
4
580
Other Decks in Technology
See All in Technology
生成AI・AIエージェント時代、データサイエンティストは何をする人なのか?そして、今学生であるあなたは何を学ぶべきか?
kuri8ive
2
1.2k
HIG学習用スライド
yuukiw00w
0
110
私も懇親会は苦手でした ~苦手だからこそ懇親会を楽しむ方法~ / 20251127 Masaki Okuda
shift_evolve
PRO
4
540
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
0
640
事業部のプロジェクト進行と開発チームの改善の “時間軸" のすり合わせ
konifar
9
2.8k
Claude Code はじめてガイド -1時間で学べるAI駆動開発の基本と実践-
oikon48
41
24k
Data Hubグループ 紹介資料
sansan33
PRO
0
2.3k
How native lazy objects will change Doctrine and Symfony forever
beberlei
1
370
履歴テーブル、今回はこう作りました 〜 Delegated Types編 〜 / How We Built Our History Table This Time — With Delegated Types
moznion
15
9.3k
Product Engineer
resilire
0
130
セキュリティAIエージェントの現在と未来 / PSS #2 Takumi Session
flatt_security
3
1.3k
オープンデータの内製化から分かったGISデータを巡る行政の課題
naokim84
2
1.3k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
For a Future-Friendly Web
brad_frost
180
10k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
How STYLIGHT went responsive
nonsquared
100
5.9k
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