SlideShare a Scribd company logo
© Integrated Computer Solutions, Inc. All Rights Reserved
Migrating from
QNX Photon to Qt
Bobby Chawla <bchawla@ics.com>
Integrated Computer Solutions, Inc.
© Integrated Computer Solutions, Inc. All Rights Reserved
Introduction
● Working with ICS for about four years now
● Taste for real-time software development
● Used to work with Process Control Systems for industry:
○ Pulp & Paper machines
○ Lots of QNX development
● Offered to work on QNX itself
● About five years developing various parts of Photon
© Integrated Computer Solutions, Inc. All Rights Reserved
Agenda
● Introduction
● What is (was) Photon?
● What is Qt?
● Anatomy of an application
● Architecture differences
● Qt Signals and slots
● Widget comparisons
● When to port
● Porting from QNX
● Conclusion
© Integrated Computer Solutions, Inc. All Rights Reserved
What is (was) Photon?
● Photon : A name with multiple meanings:
○ Light particle
○ QNX/Photon MicroGUI
■ typically used with Neutrino
○ Photon UI project (Javascript framework to create UIs)
○ Photon OS distribution
… Probably More … .
© Integrated Computer Solutions, Inc. All Rights Reserved
What is (was) Photon?
● Photon : A name with multiple meanings:
○ Light particle
○ QNX/Photon MicroGUI
■ typically used with Neutrino
○ Photon UI project (Javascript framework to create UIs)
○ Photon OS distribution
We are talking about the QNX/Photon MicroGUI .
© Integrated Computer Solutions, Inc. All Rights Reserved
What is (was) Photon… cont. ● Started in the Mid-90s
● Had a Windows 95 look and feel:
○ “modern” at the time
● Evolved with more GUI options
© Integrated Computer Solutions, Inc. All Rights Reserved
What is(was) Photon… cont.
● Deprecated Could say Depreciated - Appropriate verb
● QNX v6.32 - Full implementation
● QNX v6.4 - Reduced widget set:
○ Removed browser & email applications
○ Removed PtTerminal
■ though PtTty was still there
● QNX v6.5 - Essentially the windowing system was still there:
○ But not designed to be a desktop OS
● QNX v6.6 - Unsupported:
○ But die-hards could import the 6.5 executables
● QNX v7 - Unavailable - Now it’s deprecated
© Integrated Computer Solutions, Inc. All Rights Reserved
What is Qt?
● Cross-platform application framework
● Supports all major desktop, mobile, embedded platforms
○ Windows, Mac OS, Linux, iOS, Android, QNX, etc.
● Written in C++
● Not just for GUI, but includes portable abstraction for most OS features
○ File i/o, strings, containers, networking, etc.
● Around since 1991
● Used by approximately 1 million developers in over 70 industries
● Owned by The Qt Company
● Available under GPL/LGPL and commercial licenses
© Integrated Computer Solutions, Inc. All Rights Reserved
What is Qt? - Qt Widgets
● Traditional building blocks for
GUI applications in Qt:
○ e.g. QButton, QLabel,
QTextEdit
● Can use Qt Designer - a GUI
builder for designing dialogs and
screens
● Have native look on each
platform
● Originally designed for desktop
applications, but also usable on
mobile and embedded.
© Integrated Computer Solutions, Inc. All Rights Reserved
What is Qt? - QML (aka Qt Quick)
● Simple JSON-like declarative language
● Provides basic elements to build up user interfaces
● Elements support properties, signals, methods
● Makes it easy to define animated, fluid, touchscreen interfaces
● Qt Quick Controls provide widget-like UI elements
● Backed by full JavaScript engine
● Qt Creator IDE has a QML Designer
○ developers typically write code by hand (QML Designer getting better)
● Mostly targeted at mobile and embedded
○ but also supported on desktop platforms
© Integrated Computer Solutions, Inc. All Rights Reserved
What is Qt? - Qt on QNX
● Qt has been available as an option for QNX development since 2010
● Qt widgets provide similar classes and mechanisms to Photon’s
● Typically find source code to Qt, configure for QNX, and compile
● Given the current customer base of QNX-7 - QNX is encouraging QML:
○ Partially configured for QML already in Momentics
○ Since this presentation is about porting from Photon,
■ we will focus on Qt widgets
© Integrated Computer Solutions, Inc. All Rights Reserved
Anatomy of an Application
● At a high level, both Photon & Qt GUI applications are:
○ Event driven
○ Similar parent/child relationships
■ parent window
■ every widget has a parent which helps keep things organized
● e.g. when the parent gets deleted, the child cleans up as well
■ dialogs - children of parent’s windows
○ Interactions
■ Photon uses callbacks vs. Qt using “signals and slots”
○ Qt separates widgets from layout managers
© Integrated Computer Solutions, Inc. All Rights Reserved
Architecture Differences
● Photon (conceptually) is an entire graphical system:
○ Though not as well documented, just as easy to create an app that captures
Photon events, thus being able to create your own:
■ graphics driver
■ mouse controller
■ screen capture app
■ virtual keyboard
■ other IO device
© Integrated Computer Solutions, Inc. All Rights Reserved
Architecture Differences… cont.
● Those of you familiar with Photon will know about:
○ Pg….() functions - Raw graphics functions
○ Ph….() functions - Open Photon channels, create regions, collect/emit
events
○ Pt….() functions - Create, Manipulate & Destroy widgets
● Qt:
○ Qt widget classes map mostly to Pt….() functions
○ Mature ecosystem of other classes for portability & convenience
■ e.g. stacks, accessing filesystem, strings
© Integrated Computer Solutions, Inc. All Rights Reserved
Architecture Differences… cont.
● Typically Qt is run in a third-party’s windowing environment:
○ Qt has backends for different graphics rendering environments
■ X11/xcb, OpenGL/ES, Linux frame buffer, etc.
■ look & feel designed to look native on the device
● same application looks/behaves slightly differently on a Mac than on
Linux or Windows
○ If working with a specialized board
■ need to speak with the hardware (BSP) vendor to interface with new
devices
© Integrated Computer Solutions, Inc. All Rights Reserved
Architecture Differences… cont.
Application development: PhAB , Qt Designer (GUI builder) & Qt Creator (IDE).
© Integrated Computer Solutions, Inc. All Rights Reserved
Architecture Differences… cont.
● Photon uses “PhAB”,
● Can compile/link in PhAB
● PhAB - not your average
application builder:
○ No source code created for
PhAB windows/dialog
○ GUI component info
written as binary data as
part of the executable
© Integrated Computer Solutions, Inc. All Rights Reserved
Architecture Differences… cont.
● Qt Creator (and Designer) is
not your average application
builder either:
○ Full development suite
○ Architecture-safe classes
○ PhAB/Photon users will
appreciate how easily tasks
get done (e.g. menus)
© Integrated Computer Solutions, Inc. All Rights Reserved
Architecture Differences… menus
© Integrated Computer Solutions, Inc. All Rights Reserved
Qt Signals & Slots
● Another term that can have different meanings: “Signals”:
○ QNX developers associate “Signals” as an operating system message
■ Signal can be passed from one process to another
■ Interrupts the receiving process, and process the signal
■ The call does not block the calling process
● Qt “Signals” are not the same as Linux/POSIX signals above:
○ Qt Signals & Slots are a one-to-many messaging system that lets Qt
“Objects” communicate within a process
○ Could be blocking function call, or could be queued
○ No “return” values from a signal
● Which differ from Boost Signals/Slots - allow return values from the “slots”
© Integrated Computer Solutions, Inc. All Rights Reserved
Qt Signals & Slots… cont.
● Qt signals are an expanded form of callbacks that allow separation of UI
elements from business logic
● Signals are emitted by Qt objects when event occurs (e.g. button pressed)
● Slots are methods that can be called in response to a signal
● Typically connect signals and slots at run-time
● Qt uses “moc” tool to generate meta object information about signals/slots
● Type safe alternative to callbacks, checked at compile time or run time
© Integrated Computer Solutions, Inc. All Rights Reserved
Widget Comparison - Menus and Options
Functionality Photon Qt Major Differences
Horizontal Menubar PtMenuBar QMenuBar QMenuBar has several insert Item
methods.
Pulldown Popup Menu PtMenu QMenu Qt provides a cleaner abstraction
using QMenu.
The common object for pulldowns
popups, and menubars
Menu button PtMenuButton QMenu
Combo Box PtComboBox QComboBox
Toggle or Multiple-selection
options
PtToggleButton
(Pt_TOGGLE_RADIO)
QRadioButton or
QCheckBox
© Integrated Computer Solutions, Inc. All Rights Reserved
Widget Comparison - Dialogs
Functionality Photon Qt
Error PtAlert() QErrorMessage
Information PtNotice() QMessageBox
Question PtAlert() QMessageBox
Warning PtAlert() QMessageBox
Progress PtProgress widget QProgressDialog
Simple Input PtPrompt() QInputDialog
File Chooser PtFileSelection() QFileDialog
HTML/Web display PtWebClient widget QWebView
Generic/Custom PtWindow container QDialog
● Italicized Photon
items (such as
PtAlert()) are
convenience
functions which
use widgets to
build a dialog
© Integrated Computer Solutions, Inc. All Rights Reserved
Widget Comparison… cont.
● Examples of widgets that are not 1 to 1 relationships:
○ PtTimer
○ RtTrend
● Qt has a large user base with many contributors:
○ Many sophisticated Qt widgets that don't exist in Photon are available from
3rd
party vendors
© Integrated Computer Solutions, Inc. All Rights Reserved
Widget Comparison - Containers vs. Layouts
● PtContainer (or it’s subclasses) allow the automatic placement of widgets in a:
○ FILL_LAYOUT (Horizontal / Vertical)
○ ROW_LAYOUT (Horizontal/Vertical with options for Justify, Wrap and Pack)
○ GRID_LAYOUT
○ ANCHOR_LAYOUT
● In Qt, layouts are more sophisticated:
○ Layouts are separated from any widget subclassed off of QWidget
○ Container widgets can manage their children using QWidget::setLayout()
© Integrated Computer Solutions, Inc. All Rights Reserved
When to Port / When to Consider Rewrite
● Photon is deprecated / newer hardware not supported
○ Eventually will run out of hardware options
○ Or user expectations for a device increase
● What code can you typically keep and what do you need to rewrite?
● Design aspects that makes it easier to port, e. g.
○ Good separation of UI and business logic.
○ Much of your application can be dissected into Model-View-Controller
(MVC) portions
© Integrated Computer Solutions, Inc. All Rights Reserved
Object Oriented Design 101
● Qt is based off C++:
○ Photon apps are usually ‘C’ based
○ Need to port some or all of your code to C++.
○ Your team may need to learn object-oriented design.
○ May require re-architecting (e.g. to separate GUI from business logic).
● C++ applications typically better at compartmentalizing,
○ Scale better for larger projects
© Integrated Computer Solutions, Inc. All Rights Reserved
Object
Oriented
Design
“101”
© Integrated Computer Solutions, Inc. All Rights Reserved
Object Oriented Design 101… cont.
● Created the same application in Photon & Qt
● In Photon had a functional relation PtText → callback → PtSetArg( PtLabel )
● Can do a similar connection with Qt:
○ QLineEdit → signal to QObject::AddHello → signal to QLabel
● However, a cleaner implementation is to create a ‘Hello’ widget:
○ Create a QHelloLabel as a subclass of QLabel,
○ QHelloLabel displays the string with ‘Hello’ prepended
○ QLineEdit → signal to QHelloLabel
Less code, less portions that can break, easier to test, ….
© Integrated Computer Solutions, Inc. All Rights Reserved
Porting from QNX
Note for native QNX-ers
● QNX has been, and continues to be a “Message passing” architecture:
○ Lightweight transition from one process to another
○ Designed for many thousands (millions) of messages
○ Many aspects of QNX based on message passing
○ Photon is no exception
● If porting to other operating systems:
○ Can’t rely as heavily on OS-level message passing
○ Buffered streams more common
○ QNX is a POSIX OS, therefore a port to Linux should be easier
© Integrated Computer Solutions, Inc. All Rights Reserved
Conclusion
● Most applications would have one to one mapping to Qt widgets
● Need help getting started? ICS developers:
○ Have many years of experience with Qt and QNX/Photon
○ Can assist you with the port (while your developers continue advancing
with current development)
○ Can help you get started by analyzing your application and coming up with
a plan of action
© Integrated Computer Solutions, Inc. All Rights Reserved
Questions?

More Related Content

What's hot

Chapter 3 Motherboard and BIOS
Chapter 3 Motherboard and BIOSChapter 3 Motherboard and BIOS
Chapter 3 Motherboard and BIOSaskme
 
Cisco IOS™ Software
Cisco IOS™ SoftwareCisco IOS™ Software
Cisco IOS™ Software
sathish sak
 
Huawei GPON Fundamentals
Huawei GPON FundamentalsHuawei GPON Fundamentals
Huawei GPON Fundamentals
ibrahimnabil17
 
Windows for Everyone(Operating System)
Windows for Everyone(Operating System)Windows for Everyone(Operating System)
Windows for Everyone(Operating System)
Waleed Khan
 
TDM Traffic Migration into IP Backhaul
TDM Traffic Migration into IP BackhaulTDM Traffic Migration into IP Backhaul
TDM Traffic Migration into IP Backhaul
Khalil Al-Alami
 
امتحان المديول الأول ICT من كورس ICDL v5
امتحان المديول الأول ICT من كورس ICDL v5امتحان المديول الأول ICT من كورس ICDL v5
امتحان المديول الأول ICT من كورس ICDL v5
um_adeveloper
 
Internet of Things (IoT) - Trends, Challenges and Opportunities
Internet of Things (IoT) - Trends, Challenges and OpportunitiesInternet of Things (IoT) - Trends, Challenges and Opportunities
Internet of Things (IoT) - Trends, Challenges and Opportunities
Dr. Mazlan Abbas
 
Gpon the technology --rev 1
Gpon the technology --rev 1Gpon the technology --rev 1
Gpon the technology --rev 1
guerrid
 
Fttx arcitectures
Fttx arcitecturesFttx arcitectures
Fttx arcitectures
Komkrit Narksap
 
Alcatel Lucent Gpon Technology Training 2
Alcatel Lucent Gpon Technology Training 2Alcatel Lucent Gpon Technology Training 2
Alcatel Lucent Gpon Technology Training 2
Wahyu Nasution
 
Network Administrator Project PowerPoint
Network Administrator Project PowerPointNetwork Administrator Project PowerPoint
Network Administrator Project PowerPointSteven Washington
 
installing and optimizing operating system software
installing and optimizing operating system software   installing and optimizing operating system software
installing and optimizing operating system software
Jaleto Sunkemo
 
Determine best fit topology copy
Determine best fit topology   copyDetermine best fit topology   copy
Determine best fit topology copy
Jaleto Sunkemo
 
How to create and delete vlan on cisco catalyst switch
How to create and delete vlan on cisco catalyst switchHow to create and delete vlan on cisco catalyst switch
How to create and delete vlan on cisco catalyst switchIT Tech
 
IT system and network administrator
IT system and network administratorIT system and network administrator
IT system and network administrator
Muhammad Nasir ( MCSA/ MCTS / MCITP)
 
Guide d’activités THYMIO - Fréquence Écoles
Guide d’activités THYMIO - Fréquence ÉcolesGuide d’activités THYMIO - Fréquence Écoles
Guide d’activités THYMIO - Fréquence Écoles
Association Fréquence écoles
 
Configure and administer server
Configure and administer serverConfigure and administer server
Configure and administer server
Abenezer Abiti
 
Computer networking demo
Computer networking demoComputer networking demo
Computer networking demo
Melchor Maravillas
 
Configuring and administrate server
Configuring and administrate serverConfiguring and administrate server
Configuring and administrate server
Gera Paulos
 
History of Linux.pptx
History of Linux.pptxHistory of Linux.pptx
History of Linux.pptx
rikritiKoirala1
 

What's hot (20)

Chapter 3 Motherboard and BIOS
Chapter 3 Motherboard and BIOSChapter 3 Motherboard and BIOS
Chapter 3 Motherboard and BIOS
 
Cisco IOS™ Software
Cisco IOS™ SoftwareCisco IOS™ Software
Cisco IOS™ Software
 
Huawei GPON Fundamentals
Huawei GPON FundamentalsHuawei GPON Fundamentals
Huawei GPON Fundamentals
 
Windows for Everyone(Operating System)
Windows for Everyone(Operating System)Windows for Everyone(Operating System)
Windows for Everyone(Operating System)
 
TDM Traffic Migration into IP Backhaul
TDM Traffic Migration into IP BackhaulTDM Traffic Migration into IP Backhaul
TDM Traffic Migration into IP Backhaul
 
امتحان المديول الأول ICT من كورس ICDL v5
امتحان المديول الأول ICT من كورس ICDL v5امتحان المديول الأول ICT من كورس ICDL v5
امتحان المديول الأول ICT من كورس ICDL v5
 
Internet of Things (IoT) - Trends, Challenges and Opportunities
Internet of Things (IoT) - Trends, Challenges and OpportunitiesInternet of Things (IoT) - Trends, Challenges and Opportunities
Internet of Things (IoT) - Trends, Challenges and Opportunities
 
Gpon the technology --rev 1
Gpon the technology --rev 1Gpon the technology --rev 1
Gpon the technology --rev 1
 
Fttx arcitectures
Fttx arcitecturesFttx arcitectures
Fttx arcitectures
 
Alcatel Lucent Gpon Technology Training 2
Alcatel Lucent Gpon Technology Training 2Alcatel Lucent Gpon Technology Training 2
Alcatel Lucent Gpon Technology Training 2
 
Network Administrator Project PowerPoint
Network Administrator Project PowerPointNetwork Administrator Project PowerPoint
Network Administrator Project PowerPoint
 
installing and optimizing operating system software
installing and optimizing operating system software   installing and optimizing operating system software
installing and optimizing operating system software
 
Determine best fit topology copy
Determine best fit topology   copyDetermine best fit topology   copy
Determine best fit topology copy
 
How to create and delete vlan on cisco catalyst switch
How to create and delete vlan on cisco catalyst switchHow to create and delete vlan on cisco catalyst switch
How to create and delete vlan on cisco catalyst switch
 
IT system and network administrator
IT system and network administratorIT system and network administrator
IT system and network administrator
 
Guide d’activités THYMIO - Fréquence Écoles
Guide d’activités THYMIO - Fréquence ÉcolesGuide d’activités THYMIO - Fréquence Écoles
Guide d’activités THYMIO - Fréquence Écoles
 
Configure and administer server
Configure and administer serverConfigure and administer server
Configure and administer server
 
Computer networking demo
Computer networking demoComputer networking demo
Computer networking demo
 
Configuring and administrate server
Configuring and administrate serverConfiguring and administrate server
Configuring and administrate server
 
History of Linux.pptx
History of Linux.pptxHistory of Linux.pptx
History of Linux.pptx
 

Similar to Migrating from Photon to Qt

Porting Qt to a new Smartphone for Fun and Fame
Porting Qt to a new Smartphone for Fun and FamePorting Qt to a new Smartphone for Fun and Fame
Porting Qt to a new Smartphone for Fun and Fame
Jarosław Staniek
 
Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Johan Thelin
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
Janel Heilbrunn
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
ICS
 
Qt for Python
Qt for PythonQt for Python
Qt for Python
ICS
 
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Prabindh Sundareson
 
Qt for beginners part 4 doing more
Qt for beginners part 4   doing moreQt for beginners part 4   doing more
Qt for beginners part 4 doing more
ICS
 
Software Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business LogicSoftware Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business Logic
ICS
 
Green Custard Friday Talk 22: Flutter
Green Custard Friday Talk 22: FlutterGreen Custard Friday Talk 22: Flutter
Green Custard Friday Talk 22: Flutter
Green Custard
 
Qt 5 - C++ and Widgets
Qt 5 - C++ and WidgetsQt 5 - C++ and Widgets
Qt 5 - C++ and Widgets
Juha Peltomäki
 
Qt 6 Chat - Are You Ready?
Qt 6 Chat - Are You Ready?Qt 6 Chat - Are You Ready?
Qt 6 Chat - Are You Ready?
ICS
 
Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017
Johan Thelin
 
Treinamento Qt básico - aula I
Treinamento Qt básico - aula ITreinamento Qt básico - aula I
Treinamento Qt básico - aula I
Marcelo Barros de Almeida
 
Meet Qt
Meet QtMeet Qt
Cross Platform Qt
Cross Platform QtCross Platform Qt
Cross Platform Qt
Johan Thelin
 
Qtframework
QtframeworkQtframework
Qtframework
Aditi Shrivastava
 
Network programming with Qt (C++)
Network programming with Qt (C++)Network programming with Qt (C++)
Network programming with Qt (C++)
Manohar Kuse
 
So I downloaded Qt, Now What?
So I downloaded Qt, Now What?So I downloaded Qt, Now What?
So I downloaded Qt, Now What?
ICS
 
So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?
Janel Heilbrunn
 

Similar to Migrating from Photon to Qt (20)

Porting Qt to a new Smartphone for Fun and Fame
Porting Qt to a new Smartphone for Fun and FamePorting Qt to a new Smartphone for Fun and Fame
Porting Qt to a new Smartphone for Fun and Fame
 
Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
 
Qt for Python
Qt for PythonQt for Python
Qt for Python
 
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
 
Qt for beginners part 4 doing more
Qt for beginners part 4   doing moreQt for beginners part 4   doing more
Qt for beginners part 4 doing more
 
Software Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business LogicSoftware Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business Logic
 
Green Custard Friday Talk 22: Flutter
Green Custard Friday Talk 22: FlutterGreen Custard Friday Talk 22: Flutter
Green Custard Friday Talk 22: Flutter
 
Qt 5 - C++ and Widgets
Qt 5 - C++ and WidgetsQt 5 - C++ and Widgets
Qt 5 - C++ and Widgets
 
Qt 6 Chat - Are You Ready?
Qt 6 Chat - Are You Ready?Qt 6 Chat - Are You Ready?
Qt 6 Chat - Are You Ready?
 
Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017
 
Treinamento Qt básico - aula I
Treinamento Qt básico - aula ITreinamento Qt básico - aula I
Treinamento Qt básico - aula I
 
Meet Qt
Meet QtMeet Qt
Meet Qt
 
Cross Platform Qt
Cross Platform QtCross Platform Qt
Cross Platform Qt
 
Qtframework
QtframeworkQtframework
Qtframework
 
PyQt.pptx
PyQt.pptxPyQt.pptx
PyQt.pptx
 
Network programming with Qt (C++)
Network programming with Qt (C++)Network programming with Qt (C++)
Network programming with Qt (C++)
 
So I downloaded Qt, Now What?
So I downloaded Qt, Now What?So I downloaded Qt, Now What?
So I downloaded Qt, Now What?
 
So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?
 

More from ICS

A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
ICS
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
ICS
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdf
ICS
 
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
ICS
 
Overcoming CMake Configuration Issues Webinar
Overcoming CMake Configuration Issues WebinarOvercoming CMake Configuration Issues Webinar
Overcoming CMake Configuration Issues Webinar
ICS
 
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdfEnhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
ICS
 
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdf
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdfDesigning and Managing IoT Devices for Rapid Deployment - Webinar.pdf
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdf
ICS
 
Quality and Test in Medical Device Design - Part 1.pdf
Quality and Test in Medical Device Design - Part 1.pdfQuality and Test in Medical Device Design - Part 1.pdf
Quality and Test in Medical Device Design - Part 1.pdf
ICS
 
Creating Digital Twins Using Rapid Development Techniques.pdf
Creating Digital Twins Using Rapid Development Techniques.pdfCreating Digital Twins Using Rapid Development Techniques.pdf
Creating Digital Twins Using Rapid Development Techniques.pdf
ICS
 
Secure Your Medical Devices From the Ground Up
Secure Your Medical Devices From the Ground Up Secure Your Medical Devices From the Ground Up
Secure Your Medical Devices From the Ground Up
ICS
 
Cybersecurity and Software Updates in Medical Devices.pdf
Cybersecurity and Software Updates in Medical Devices.pdfCybersecurity and Software Updates in Medical Devices.pdf
Cybersecurity and Software Updates in Medical Devices.pdf
ICS
 
MDG Panel - Creating Expert Level GUIs for Complex Medical Devices
MDG Panel - Creating Expert Level GUIs for Complex Medical DevicesMDG Panel - Creating Expert Level GUIs for Complex Medical Devices
MDG Panel - Creating Expert Level GUIs for Complex Medical Devices
ICS
 
How to Craft a Winning IOT Device Management Solution
How to Craft a Winning IOT Device Management SolutionHow to Craft a Winning IOT Device Management Solution
How to Craft a Winning IOT Device Management Solution
ICS
 
Bridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsBridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory Teams
ICS
 
IoT Device Fleet Management: Create a Robust Solution with Azure
IoT Device Fleet Management: Create a Robust Solution with AzureIoT Device Fleet Management: Create a Robust Solution with Azure
IoT Device Fleet Management: Create a Robust Solution with Azure
ICS
 
Basic Cmake for Qt Users
Basic Cmake for Qt UsersBasic Cmake for Qt Users
Basic Cmake for Qt Users
ICS
 
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
ICS
 
Qt Installer Framework
Qt Installer FrameworkQt Installer Framework
Qt Installer Framework
ICS
 
Bridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsBridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory Teams
ICS
 
Overcome Hardware And Software Challenges - Medical Device Case Study
Overcome Hardware And Software Challenges - Medical Device Case StudyOvercome Hardware And Software Challenges - Medical Device Case Study
Overcome Hardware And Software Challenges - Medical Device Case Study
ICS
 

More from ICS (20)

A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdf
 
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
 
Overcoming CMake Configuration Issues Webinar
Overcoming CMake Configuration Issues WebinarOvercoming CMake Configuration Issues Webinar
Overcoming CMake Configuration Issues Webinar
 
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdfEnhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
 
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdf
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdfDesigning and Managing IoT Devices for Rapid Deployment - Webinar.pdf
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdf
 
Quality and Test in Medical Device Design - Part 1.pdf
Quality and Test in Medical Device Design - Part 1.pdfQuality and Test in Medical Device Design - Part 1.pdf
Quality and Test in Medical Device Design - Part 1.pdf
 
Creating Digital Twins Using Rapid Development Techniques.pdf
Creating Digital Twins Using Rapid Development Techniques.pdfCreating Digital Twins Using Rapid Development Techniques.pdf
Creating Digital Twins Using Rapid Development Techniques.pdf
 
Secure Your Medical Devices From the Ground Up
Secure Your Medical Devices From the Ground Up Secure Your Medical Devices From the Ground Up
Secure Your Medical Devices From the Ground Up
 
Cybersecurity and Software Updates in Medical Devices.pdf
Cybersecurity and Software Updates in Medical Devices.pdfCybersecurity and Software Updates in Medical Devices.pdf
Cybersecurity and Software Updates in Medical Devices.pdf
 
MDG Panel - Creating Expert Level GUIs for Complex Medical Devices
MDG Panel - Creating Expert Level GUIs for Complex Medical DevicesMDG Panel - Creating Expert Level GUIs for Complex Medical Devices
MDG Panel - Creating Expert Level GUIs for Complex Medical Devices
 
How to Craft a Winning IOT Device Management Solution
How to Craft a Winning IOT Device Management SolutionHow to Craft a Winning IOT Device Management Solution
How to Craft a Winning IOT Device Management Solution
 
Bridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsBridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory Teams
 
IoT Device Fleet Management: Create a Robust Solution with Azure
IoT Device Fleet Management: Create a Robust Solution with AzureIoT Device Fleet Management: Create a Robust Solution with Azure
IoT Device Fleet Management: Create a Robust Solution with Azure
 
Basic Cmake for Qt Users
Basic Cmake for Qt UsersBasic Cmake for Qt Users
Basic Cmake for Qt Users
 
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
 
Qt Installer Framework
Qt Installer FrameworkQt Installer Framework
Qt Installer Framework
 
Bridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsBridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory Teams
 
Overcome Hardware And Software Challenges - Medical Device Case Study
Overcome Hardware And Software Challenges - Medical Device Case StudyOvercome Hardware And Software Challenges - Medical Device Case Study
Overcome Hardware And Software Challenges - Medical Device Case Study
 

Recently uploaded

Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 

Recently uploaded (20)

Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 

Migrating from Photon to Qt

  • 1. © Integrated Computer Solutions, Inc. All Rights Reserved Migrating from QNX Photon to Qt Bobby Chawla <bchawla@ics.com> Integrated Computer Solutions, Inc.
  • 2. © Integrated Computer Solutions, Inc. All Rights Reserved Introduction ● Working with ICS for about four years now ● Taste for real-time software development ● Used to work with Process Control Systems for industry: ○ Pulp & Paper machines ○ Lots of QNX development ● Offered to work on QNX itself ● About five years developing various parts of Photon
  • 3. © Integrated Computer Solutions, Inc. All Rights Reserved Agenda ● Introduction ● What is (was) Photon? ● What is Qt? ● Anatomy of an application ● Architecture differences ● Qt Signals and slots ● Widget comparisons ● When to port ● Porting from QNX ● Conclusion
  • 4. © Integrated Computer Solutions, Inc. All Rights Reserved What is (was) Photon? ● Photon : A name with multiple meanings: ○ Light particle ○ QNX/Photon MicroGUI ■ typically used with Neutrino ○ Photon UI project (Javascript framework to create UIs) ○ Photon OS distribution … Probably More … .
  • 5. © Integrated Computer Solutions, Inc. All Rights Reserved What is (was) Photon? ● Photon : A name with multiple meanings: ○ Light particle ○ QNX/Photon MicroGUI ■ typically used with Neutrino ○ Photon UI project (Javascript framework to create UIs) ○ Photon OS distribution We are talking about the QNX/Photon MicroGUI .
  • 6. © Integrated Computer Solutions, Inc. All Rights Reserved What is (was) Photon… cont. ● Started in the Mid-90s ● Had a Windows 95 look and feel: ○ “modern” at the time ● Evolved with more GUI options
  • 7. © Integrated Computer Solutions, Inc. All Rights Reserved What is(was) Photon… cont. ● Deprecated Could say Depreciated - Appropriate verb ● QNX v6.32 - Full implementation ● QNX v6.4 - Reduced widget set: ○ Removed browser & email applications ○ Removed PtTerminal ■ though PtTty was still there ● QNX v6.5 - Essentially the windowing system was still there: ○ But not designed to be a desktop OS ● QNX v6.6 - Unsupported: ○ But die-hards could import the 6.5 executables ● QNX v7 - Unavailable - Now it’s deprecated
  • 8. © Integrated Computer Solutions, Inc. All Rights Reserved What is Qt? ● Cross-platform application framework ● Supports all major desktop, mobile, embedded platforms ○ Windows, Mac OS, Linux, iOS, Android, QNX, etc. ● Written in C++ ● Not just for GUI, but includes portable abstraction for most OS features ○ File i/o, strings, containers, networking, etc. ● Around since 1991 ● Used by approximately 1 million developers in over 70 industries ● Owned by The Qt Company ● Available under GPL/LGPL and commercial licenses
  • 9. © Integrated Computer Solutions, Inc. All Rights Reserved What is Qt? - Qt Widgets ● Traditional building blocks for GUI applications in Qt: ○ e.g. QButton, QLabel, QTextEdit ● Can use Qt Designer - a GUI builder for designing dialogs and screens ● Have native look on each platform ● Originally designed for desktop applications, but also usable on mobile and embedded.
  • 10. © Integrated Computer Solutions, Inc. All Rights Reserved What is Qt? - QML (aka Qt Quick) ● Simple JSON-like declarative language ● Provides basic elements to build up user interfaces ● Elements support properties, signals, methods ● Makes it easy to define animated, fluid, touchscreen interfaces ● Qt Quick Controls provide widget-like UI elements ● Backed by full JavaScript engine ● Qt Creator IDE has a QML Designer ○ developers typically write code by hand (QML Designer getting better) ● Mostly targeted at mobile and embedded ○ but also supported on desktop platforms
  • 11. © Integrated Computer Solutions, Inc. All Rights Reserved What is Qt? - Qt on QNX ● Qt has been available as an option for QNX development since 2010 ● Qt widgets provide similar classes and mechanisms to Photon’s ● Typically find source code to Qt, configure for QNX, and compile ● Given the current customer base of QNX-7 - QNX is encouraging QML: ○ Partially configured for QML already in Momentics ○ Since this presentation is about porting from Photon, ■ we will focus on Qt widgets
  • 12. © Integrated Computer Solutions, Inc. All Rights Reserved Anatomy of an Application ● At a high level, both Photon & Qt GUI applications are: ○ Event driven ○ Similar parent/child relationships ■ parent window ■ every widget has a parent which helps keep things organized ● e.g. when the parent gets deleted, the child cleans up as well ■ dialogs - children of parent’s windows ○ Interactions ■ Photon uses callbacks vs. Qt using “signals and slots” ○ Qt separates widgets from layout managers
  • 13. © Integrated Computer Solutions, Inc. All Rights Reserved Architecture Differences ● Photon (conceptually) is an entire graphical system: ○ Though not as well documented, just as easy to create an app that captures Photon events, thus being able to create your own: ■ graphics driver ■ mouse controller ■ screen capture app ■ virtual keyboard ■ other IO device
  • 14. © Integrated Computer Solutions, Inc. All Rights Reserved Architecture Differences… cont. ● Those of you familiar with Photon will know about: ○ Pg….() functions - Raw graphics functions ○ Ph….() functions - Open Photon channels, create regions, collect/emit events ○ Pt….() functions - Create, Manipulate & Destroy widgets ● Qt: ○ Qt widget classes map mostly to Pt….() functions ○ Mature ecosystem of other classes for portability & convenience ■ e.g. stacks, accessing filesystem, strings
  • 15. © Integrated Computer Solutions, Inc. All Rights Reserved Architecture Differences… cont. ● Typically Qt is run in a third-party’s windowing environment: ○ Qt has backends for different graphics rendering environments ■ X11/xcb, OpenGL/ES, Linux frame buffer, etc. ■ look & feel designed to look native on the device ● same application looks/behaves slightly differently on a Mac than on Linux or Windows ○ If working with a specialized board ■ need to speak with the hardware (BSP) vendor to interface with new devices
  • 16. © Integrated Computer Solutions, Inc. All Rights Reserved Architecture Differences… cont. Application development: PhAB , Qt Designer (GUI builder) & Qt Creator (IDE).
  • 17. © Integrated Computer Solutions, Inc. All Rights Reserved Architecture Differences… cont. ● Photon uses “PhAB”, ● Can compile/link in PhAB ● PhAB - not your average application builder: ○ No source code created for PhAB windows/dialog ○ GUI component info written as binary data as part of the executable
  • 18. © Integrated Computer Solutions, Inc. All Rights Reserved Architecture Differences… cont. ● Qt Creator (and Designer) is not your average application builder either: ○ Full development suite ○ Architecture-safe classes ○ PhAB/Photon users will appreciate how easily tasks get done (e.g. menus)
  • 19. © Integrated Computer Solutions, Inc. All Rights Reserved Architecture Differences… menus
  • 20. © Integrated Computer Solutions, Inc. All Rights Reserved Qt Signals & Slots ● Another term that can have different meanings: “Signals”: ○ QNX developers associate “Signals” as an operating system message ■ Signal can be passed from one process to another ■ Interrupts the receiving process, and process the signal ■ The call does not block the calling process ● Qt “Signals” are not the same as Linux/POSIX signals above: ○ Qt Signals & Slots are a one-to-many messaging system that lets Qt “Objects” communicate within a process ○ Could be blocking function call, or could be queued ○ No “return” values from a signal ● Which differ from Boost Signals/Slots - allow return values from the “slots”
  • 21. © Integrated Computer Solutions, Inc. All Rights Reserved Qt Signals & Slots… cont. ● Qt signals are an expanded form of callbacks that allow separation of UI elements from business logic ● Signals are emitted by Qt objects when event occurs (e.g. button pressed) ● Slots are methods that can be called in response to a signal ● Typically connect signals and slots at run-time ● Qt uses “moc” tool to generate meta object information about signals/slots ● Type safe alternative to callbacks, checked at compile time or run time
  • 22. © Integrated Computer Solutions, Inc. All Rights Reserved Widget Comparison - Menus and Options Functionality Photon Qt Major Differences Horizontal Menubar PtMenuBar QMenuBar QMenuBar has several insert Item methods. Pulldown Popup Menu PtMenu QMenu Qt provides a cleaner abstraction using QMenu. The common object for pulldowns popups, and menubars Menu button PtMenuButton QMenu Combo Box PtComboBox QComboBox Toggle or Multiple-selection options PtToggleButton (Pt_TOGGLE_RADIO) QRadioButton or QCheckBox
  • 23. © Integrated Computer Solutions, Inc. All Rights Reserved Widget Comparison - Dialogs Functionality Photon Qt Error PtAlert() QErrorMessage Information PtNotice() QMessageBox Question PtAlert() QMessageBox Warning PtAlert() QMessageBox Progress PtProgress widget QProgressDialog Simple Input PtPrompt() QInputDialog File Chooser PtFileSelection() QFileDialog HTML/Web display PtWebClient widget QWebView Generic/Custom PtWindow container QDialog ● Italicized Photon items (such as PtAlert()) are convenience functions which use widgets to build a dialog
  • 24. © Integrated Computer Solutions, Inc. All Rights Reserved Widget Comparison… cont. ● Examples of widgets that are not 1 to 1 relationships: ○ PtTimer ○ RtTrend ● Qt has a large user base with many contributors: ○ Many sophisticated Qt widgets that don't exist in Photon are available from 3rd party vendors
  • 25. © Integrated Computer Solutions, Inc. All Rights Reserved Widget Comparison - Containers vs. Layouts ● PtContainer (or it’s subclasses) allow the automatic placement of widgets in a: ○ FILL_LAYOUT (Horizontal / Vertical) ○ ROW_LAYOUT (Horizontal/Vertical with options for Justify, Wrap and Pack) ○ GRID_LAYOUT ○ ANCHOR_LAYOUT ● In Qt, layouts are more sophisticated: ○ Layouts are separated from any widget subclassed off of QWidget ○ Container widgets can manage their children using QWidget::setLayout()
  • 26. © Integrated Computer Solutions, Inc. All Rights Reserved When to Port / When to Consider Rewrite ● Photon is deprecated / newer hardware not supported ○ Eventually will run out of hardware options ○ Or user expectations for a device increase ● What code can you typically keep and what do you need to rewrite? ● Design aspects that makes it easier to port, e. g. ○ Good separation of UI and business logic. ○ Much of your application can be dissected into Model-View-Controller (MVC) portions
  • 27. © Integrated Computer Solutions, Inc. All Rights Reserved Object Oriented Design 101 ● Qt is based off C++: ○ Photon apps are usually ‘C’ based ○ Need to port some or all of your code to C++. ○ Your team may need to learn object-oriented design. ○ May require re-architecting (e.g. to separate GUI from business logic). ● C++ applications typically better at compartmentalizing, ○ Scale better for larger projects
  • 28. © Integrated Computer Solutions, Inc. All Rights Reserved Object Oriented Design “101”
  • 29. © Integrated Computer Solutions, Inc. All Rights Reserved Object Oriented Design 101… cont. ● Created the same application in Photon & Qt ● In Photon had a functional relation PtText → callback → PtSetArg( PtLabel ) ● Can do a similar connection with Qt: ○ QLineEdit → signal to QObject::AddHello → signal to QLabel ● However, a cleaner implementation is to create a ‘Hello’ widget: ○ Create a QHelloLabel as a subclass of QLabel, ○ QHelloLabel displays the string with ‘Hello’ prepended ○ QLineEdit → signal to QHelloLabel Less code, less portions that can break, easier to test, ….
  • 30. © Integrated Computer Solutions, Inc. All Rights Reserved Porting from QNX Note for native QNX-ers ● QNX has been, and continues to be a “Message passing” architecture: ○ Lightweight transition from one process to another ○ Designed for many thousands (millions) of messages ○ Many aspects of QNX based on message passing ○ Photon is no exception ● If porting to other operating systems: ○ Can’t rely as heavily on OS-level message passing ○ Buffered streams more common ○ QNX is a POSIX OS, therefore a port to Linux should be easier
  • 31. © Integrated Computer Solutions, Inc. All Rights Reserved Conclusion ● Most applications would have one to one mapping to Qt widgets ● Need help getting started? ICS developers: ○ Have many years of experience with Qt and QNX/Photon ○ Can assist you with the port (while your developers continue advancing with current development) ○ Can help you get started by analyzing your application and coming up with a plan of action
  • 32. © Integrated Computer Solutions, Inc. All Rights Reserved Questions?