SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler 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

Mais conteúdo relacionado

Semelhante a 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 SolutionsKoan-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...Puppet
 
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
 
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 hadoopWisely chen
 
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...Puppet
 
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 WasWalter Heck
 
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 WasOlinData
 
Generics, the Swift ABI and you
Generics, the Swift ABI and youGenerics, the Swift ABI and you
Generics, the Swift ABI and youCarl Brown
 
jQuery Mobile Deep Dive
jQuery Mobile Deep DivejQuery Mobile Deep Dive
jQuery Mobile Deep DiveTroy Miles
 
Qt Design Patterns
Qt Design PatternsQt Design Patterns
Qt Design PatternsYnon Perek
 
Contribuire al Qt Project
Contribuire al Qt ProjectContribuire al Qt Project
Contribuire al Qt ProjectQT-day
 
OpenStack Swift production deployments
OpenStack Swift production deploymentsOpenStack Swift production deployments
OpenStack Swift production deploymentsAtul Jha
 
Scalamen and OT
Scalamen and OTScalamen and OT
Scalamen and OTgetch123
 
State of Pyramid - Brasilia 2013
State of Pyramid - Brasilia 2013State of Pyramid - Brasilia 2013
State of Pyramid - Brasilia 2013plonepaul
 
From Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEFrom Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEintelliyole
 
Ops for Developers
Ops for DevelopersOps for Developers
Ops for DevelopersMojo Lingo
 
State of Puppet
State of PuppetState of Puppet
State of PuppetPuppet
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby ConferenceJohn Woodell
 

Semelhante a 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
 

Mais de Ynon Perek

09 performance
09 performance09 performance
09 performanceYnon Perek
 
Mobile Web Intro
Mobile Web IntroMobile Web Intro
Mobile Web IntroYnon Perek
 
Qt multi threads
Qt multi threadsQt multi threads
Qt multi threadsYnon Perek
 
Architecture app
Architecture appArchitecture app
Architecture appYnon Perek
 
Unit Testing JavaScript Applications
Unit Testing JavaScript ApplicationsUnit Testing JavaScript Applications
Unit Testing JavaScript ApplicationsYnon Perek
 
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 JavaScriptYnon Perek
 
Introduction to Selenium and Ruby
Introduction to Selenium and RubyIntroduction to Selenium and Ruby
Introduction to Selenium and RubyYnon Perek
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application TestingYnon Perek
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application SecurityYnon Perek
 
JavaScript DOM Manipulations
JavaScript DOM ManipulationsJavaScript DOM Manipulations
JavaScript DOM ManipulationsYnon Perek
 

Mais de 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
 

Último

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Último (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

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