1 / 9

Neuros Technology GUI Application Development with Qt4

Neuros Technology GUI Application Development with Qt4. OSCON USA 2008. Cross-Platform Tools with Embedded Development. Qt4 offers many advantages for Embedded Development Cross-Architecture ARM, MIPS, x86, PPC, SPARC Cross-Platform Linux, BSD, Solaris, Windows, Windows CE

radwan
Télécharger la présentation

Neuros Technology GUI Application Development with Qt4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IP moves upwards Neuros Technology GUI Application Development with Qt4 OSCON USA 2008

  2. IP moves upwards Cross-Platform Tools with Embedded Development • Qt4 offers many advantages for Embedded Development • Cross-Architecture • ARM, MIPS, x86, PPC, SPARC • Cross-Platform • Linux, BSD, Solaris, Windows, Windows CE • Varying Hardware • Cell Phones, Set-Top Boxes, PC, Thin Clients All of these different development platforms are able to use the same source code

  3. IP moves upwards Step 1: Your Designed Window(step 1: mainwindow.ui)‏

  4. IP moves upwards Step 2: Attach Classes to Designer form • Following Qt4 Guides using Multiple Inheritance with Designer forms, all standard Qt4 • Created (view if wanted)‏ • mainwindow.cpp • mainwindow.h • main.cppFor details on how to build Qt4 GUI C++ source code, follow guides on: http://doc.trolltech.com

  5. IP moves upwards Step 2: Main menu Example of Main Function: #include <QApplication> #include "mainwindow.h" int main(int argc, char *argv[])‏ { QApplication app(argc,argv); // Configure QApp // Setup application info QCoreApplication::setOrganizationName("Neuros"); QCoreApplication::setOrganizationDomain("neurostechnology.com"); QCoreApplication::setApplicationName("TestText"); // Create the window and show maximized MainWindow window; window.showMaximized(); app.exec(); // Start Event Loop }

  6. IP moves upwards Step 3: Compile for PC • Compile and Run Qt4 application to for the PC • ~/$ cd ~/OSCON/step3 • ~OSCON/step3$: qmake -project • ~OSCON/step3$: qmake • ~OSCON/step3$: make • ~OSCON/step3$: ./step3

  7. IP moves upwards Step 4: Compiling for ARM • Compiling same application for ARM/OSD is very simple • First you source the cross compile enviroment so the toolchain is in the path. This makes an alias for the toolchain/Qt/bin/qmake that we can use to be sure we run ARM qmake not PC qmake • Using the same exact source we compile with the same steps as we did with the PC version (this time things renamed step4)‏

  8. IP moves upwards Step 4: Building for ARM/OSD • ~/$ source /neuros/neuros-bsp/neuros-env • ~/$ cd ~/OSCON/step4 • ~OSCON/step4$: nqmake -project • ~OSCON/step4$: nqmake • ~OSCON/step4$: make • ~OSCON/step4$: cp step4 /neuros/neuros-bsp/rootfs/fs/ • In Minicom (Serial Console): • ~#: /stepnqmake is an alias for qmake that is located in the arm toolchain directory. Without an alias the system would just think you wanted to use the local qmake

  9. IP moves upwards The PC/ARM Application With the same source code we can now run the same exact application on both ARM and PC. This simplifies the entire development process • Debugging on PC is easier • Great compatibility for multiple arch • Write once, use everywhere source code!

More Related