SlideShare a Scribd company logo
1 of 36
Download to read offline
Introducing QtRuby


       Ynon Perek
       http://qtcollege.co.il




Friday, August 3, 12
Friday, August 3, 12
Friday, August 3, 12
sudo apt-get install lynx




Friday, August 3, 12
Friday, August 3, 12
Agenda


                       • GUI Programming
                       • Qt Framework
                       • QtRuby In Action




Friday, August 3, 12
About Me


                       • Ynon Perek
                       • ynonperek@yahoo.com
                       • http://qtcollege.co.il




Friday, August 3, 12
Desktop UI




Friday, August 3, 12
GUI Frameworks




Friday, August 3, 12
Choose Qt



                       • Easy To Start




Friday, August 3, 12
Choose Qt


                       • Easy To Start
                       • Mature and widely used




Friday, August 3, 12
Famous Qt Apps




Friday, August 3, 12
Famous Qt Apps




Friday, August 3, 12
Choose Qt


                       • Easy To Start
                       • Mature and widely used
                       • True Cross Platform




Friday, August 3, 12
Choose Qt




Friday, August 3, 12
Choose Qt

                       • Easy To Start
                       • Mature and widely used
                       • True Cross Platform
                       • Cross Language



Friday, August 3, 12
Choose Qt
                       • C++
                       • Java
                       • Ruby
                       • Perl
                       • Python
                       • And More...

Friday, August 3, 12
Q&A


Friday, August 3, 12
Hello Qt
                 require 'Qt'
                  
                 app = Qt::Application.new( ARGV )
                 w   = Qt::Label.new( "Hello World" )

                 w.set_alignment( Qt::AlignHCenter | Qt::AlignVCenter ) 
                 w.show

                 app.exec




Friday, August 3, 12
Qt Terminology


                       • a Widget is a visible
                         component

                       • Label, Button,
                         Table, List, ...




Friday, August 3, 12
Qt Terminology


                       Widget




Friday, August 3, 12
Qt Widgets




Friday, August 3, 12
Qt Widgets



        http://doc.qt.nokia.com/4.7-snapshot/gallery.html




Friday, August 3, 12
Qt Layouts

                       • A top level widget
                         may contain other
                         widgets

                       • Child widgets are
                         arranged in a
                         layout




Friday, August 3, 12
DEMO: UI Designer



Friday, August 3, 12
Qt Terminology


                       • Signal specifies a
                         semantic event




Friday, August 3, 12
Qt Terminology


                       • Signals are
                         connected to slots
                         which are the
                         handling code




Friday, August 3, 12
Designer Takeaways

                       • Drag & Drop to create UI
                       • Save as .ui file
                       • Run:
                         rbuic4 file.ui -x -o file_ui.rb

                       • Use resulting .rb file but don’t modify it



Friday, August 3, 12
Qt Actions
  require 'Qt'
  require './demo1_ui.rb'

  a = Qt::Application.new(ARGV)
  u = Ui_Form.new
  w = Qt::Widget.new
  u.setupUi(w)
  w.show

  u.btn1.connect( SIGNAL :clicked ) {
    u.list1.add_item( "Qt FTW" )
  }



  a.exec



Friday, August 3, 12
Qt Stock Dialogs


                       • Qt::MessageBox.about
                       • Qt::FileDialog.get_open_file_name
                       • Qt::FileDialog.get_save_file_name




Friday, August 3, 12
Qt Stock Dialogs
  require 'Qt'
  require './demo1_ui.rb'

  a = Qt::Application.new(ARGV)
  u = Ui_Form.new
  w = Qt::Widget.new
  u.setupUi(w)
  w.show

  u.btn1.connect( SIGNAL :clicked ) {
    filename = Qt::FileDialog.get_open_file_name;
    u.list1.add_item( filename )
  }

  a.exec




Friday, August 3, 12
Q&A


Friday, August 3, 12
QtRuby


                       • Easy UI for your programs
                       • Solid Foundations




Friday, August 3, 12
What Next

                       • Qt Developers Meetup
                       • August 7, 19:00
                       • http://meetup.com/QtEverywhere/
                         Tel-Aviv-Yafo-IL/740512/




Friday, August 3, 12
Resources

                       • Ruby Qt/KDE Guide
                         http://techbase.kde.org/Development/
                         Languages/Ruby



                       • Qt Tutorial Videos
                         http://qt-project.org/videos


Friday, August 3, 12
About Me


                       • Ynon Perek
                       • ynonperek@yahoo.com
                       • http://qtcollege.co.il




Friday, August 3, 12

More Related Content

Similar to Qtruby

Dark Silicon, Mobile Devices, and Possible Open-Source Solutions
Dark Silicon, Mobile Devices, and Possible Open-Source SolutionsDark Silicon, Mobile Devices, and Possible Open-Source Solutions
Dark Silicon, Mobile Devices, and Possible Open-Source Solutions
Koan-Sin Tan
 
Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...
NETWAYS
 

Similar to Qtruby (20)

Dark Silicon, Mobile Devices, and Possible Open-Source Solutions
Dark Silicon, Mobile Devices, and Possible Open-Source SolutionsDark Silicon, Mobile Devices, and Possible Open-Source Solutions
Dark Silicon, Mobile Devices, and Possible Open-Source Solutions
 
Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...
 
Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...
 
Coscup 2013 : Continuous Integration on top of hadoop
Coscup 2013 : Continuous Integration on top of hadoopCoscup 2013 : Continuous Integration on top of hadoop
Coscup 2013 : Continuous Integration on top of hadoop
 
Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...
Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...
Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...
 
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That WasPuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
 
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That WasPuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
 
Generics, the Swift ABI and you
Generics, the Swift ABI and youGenerics, the Swift ABI and you
Generics, the Swift ABI and you
 
jQuery Mobile Deep Dive
jQuery Mobile Deep DivejQuery Mobile Deep Dive
jQuery Mobile Deep Dive
 
Qt Design Patterns
Qt Design PatternsQt Design Patterns
Qt Design Patterns
 
Reef - ESUG 2010
Reef - ESUG 2010Reef - ESUG 2010
Reef - ESUG 2010
 
Contribuire al Qt Project
Contribuire al Qt ProjectContribuire al Qt Project
Contribuire al Qt Project
 
Scaling Deployment at Etsy
Scaling Deployment at EtsyScaling Deployment at Etsy
Scaling Deployment at Etsy
 
OpenStack Swift production deployments
OpenStack Swift production deploymentsOpenStack Swift production deployments
OpenStack Swift production deployments
 
Scalamen and OT
Scalamen and OTScalamen and OT
Scalamen and OT
 
State of Pyramid - Brasilia 2013
State of Pyramid - Brasilia 2013State of Pyramid - Brasilia 2013
State of Pyramid - Brasilia 2013
 
From Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEFrom Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDE
 
Ops for Developers
Ops for DevelopersOps for Developers
Ops for Developers
 
State of Puppet
State of PuppetState of Puppet
State of Puppet
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby Conference
 

More from Ynon Perek

More from Ynon Perek (20)

Regexp
RegexpRegexp
Regexp
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
09 performance
09 performance09 performance
09 performance
 
Mobile Web Intro
Mobile Web IntroMobile Web Intro
Mobile Web Intro
 
Qt multi threads
Qt multi threadsQt multi threads
Qt multi threads
 
Vimperl
VimperlVimperl
Vimperl
 
Syllabus
SyllabusSyllabus
Syllabus
 
Network
NetworkNetwork
Network
 
Architecture app
Architecture appArchitecture app
Architecture app
 
Cryptography
CryptographyCryptography
Cryptography
 
Unit Testing JavaScript Applications
Unit Testing JavaScript ApplicationsUnit Testing JavaScript Applications
Unit Testing JavaScript Applications
 
How to write easy-to-test JavaScript
How to write easy-to-test JavaScriptHow to write easy-to-test JavaScript
How to write easy-to-test JavaScript
 
Introduction to Selenium and Ruby
Introduction to Selenium and RubyIntroduction to Selenium and Ruby
Introduction to Selenium and Ruby
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application Testing
 
Accessibility
AccessibilityAccessibility
Accessibility
 
Angularjs
AngularjsAngularjs
Angularjs
 
Js memory
Js memoryJs memory
Js memory
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
JavaScript DOM Manipulations
JavaScript DOM ManipulationsJavaScript DOM Manipulations
JavaScript DOM Manipulations
 
Mongodb Intro
Mongodb IntroMongodb Intro
Mongodb Intro
 

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 

Qtruby

  • 1. Introducing QtRuby Ynon Perek http://qtcollege.co.il Friday, August 3, 12
  • 4. sudo apt-get install lynx Friday, August 3, 12
  • 6. Agenda • GUI Programming • Qt Framework • QtRuby In Action Friday, August 3, 12
  • 7. About Me • Ynon Perek • ynonperek@yahoo.com • http://qtcollege.co.il Friday, August 3, 12
  • 10. Choose Qt • Easy To Start Friday, August 3, 12
  • 11. Choose Qt • Easy To Start • Mature and widely used Friday, August 3, 12
  • 12. Famous Qt Apps Friday, August 3, 12
  • 13. Famous Qt Apps Friday, August 3, 12
  • 14. Choose Qt • Easy To Start • Mature and widely used • True Cross Platform Friday, August 3, 12
  • 16. Choose Qt • Easy To Start • Mature and widely used • True Cross Platform • Cross Language Friday, August 3, 12
  • 17. Choose Qt • C++ • Java • Ruby • Perl • Python • And More... Friday, August 3, 12
  • 19. Hello Qt require 'Qt'   app = Qt::Application.new( ARGV ) w   = Qt::Label.new( "Hello World" ) w.set_alignment( Qt::AlignHCenter | Qt::AlignVCenter )  w.show app.exec Friday, August 3, 12
  • 20. Qt Terminology • a Widget is a visible component • Label, Button, Table, List, ... Friday, August 3, 12
  • 21. Qt Terminology Widget Friday, August 3, 12
  • 23. Qt Widgets http://doc.qt.nokia.com/4.7-snapshot/gallery.html Friday, August 3, 12
  • 24. Qt Layouts • A top level widget may contain other widgets • Child widgets are arranged in a layout Friday, August 3, 12
  • 26. Qt Terminology • Signal specifies a semantic event Friday, August 3, 12
  • 27. Qt Terminology • Signals are connected to slots which are the handling code Friday, August 3, 12
  • 28. Designer Takeaways • Drag & Drop to create UI • Save as .ui file • Run: rbuic4 file.ui -x -o file_ui.rb • Use resulting .rb file but don’t modify it Friday, August 3, 12
  • 29. Qt Actions require 'Qt' require './demo1_ui.rb' a = Qt::Application.new(ARGV) u = Ui_Form.new w = Qt::Widget.new u.setupUi(w) w.show u.btn1.connect( SIGNAL :clicked ) {   u.list1.add_item( "Qt FTW" ) } a.exec Friday, August 3, 12
  • 30. Qt Stock Dialogs • Qt::MessageBox.about • Qt::FileDialog.get_open_file_name • Qt::FileDialog.get_save_file_name Friday, August 3, 12
  • 31. Qt Stock Dialogs require 'Qt' require './demo1_ui.rb' a = Qt::Application.new(ARGV) u = Ui_Form.new w = Qt::Widget.new u.setupUi(w) w.show u.btn1.connect( SIGNAL :clicked ) {   filename = Qt::FileDialog.get_open_file_name;   u.list1.add_item( filename ) } a.exec Friday, August 3, 12
  • 33. QtRuby • Easy UI for your programs • Solid Foundations Friday, August 3, 12
  • 34. What Next • Qt Developers Meetup • August 7, 19:00 • http://meetup.com/QtEverywhere/ Tel-Aviv-Yafo-IL/740512/ Friday, August 3, 12
  • 35. Resources • Ruby Qt/KDE Guide http://techbase.kde.org/Development/ Languages/Ruby • Qt Tutorial Videos http://qt-project.org/videos Friday, August 3, 12
  • 36. About Me • Ynon Perek • ynonperek@yahoo.com • http://qtcollege.co.il Friday, August 3, 12