GT RoboCup SSL
Soccer software, robot firmware
QT Introduction

What is QT?

  • QT is a framework for building UI's.
  • It makes UI's easy to make and does all the heavy lifting for us.
  • soccer uses QT for all it's GUI stuff, as well as a few other things.
  • (today will be a project heavy day, so get ready!)

How do we use QT?

Generate a *.ui file

  • A ui file is a XML file generated by QT
  • It specifies the layout of the window
  • Adding buttons or changing layout is as simple as editing the UI file
  • You can open or generate UI files in QtCreator (installed in your VM's)

Link the UI into your program

  • You will need to program 'handlers' for actions that the UI takes
    • Ex: ButtonPressed, SelectedGroup, EnterText
  • Your program can respond to these cues by modifying bits of the UI

Build Systems

  • Designed to be as flexible as 'pressing run' in your IDE, while being easily shareable between programmers
  • They make it easy to compile and run a large project on many platforms, which could have hundreds of dependencies

What does a Build System do?

  1. Compile only files that need to be compiled
    • Don't compile files that have not changed
    • Ensure changed files get properly recompiled
  2. Let your program easily interact with libraries
    • A library, such as QT, would have to be manually specified in gcc without a build system.
  3. Speed up compilation by compiling independent files in parallel
  4. Bring all compiled files together into one nice, runnable file!

CMake

  • A C/C++ build system, very widely used
  • Uses CMakeLists.txt files for configuration.
  • These files can be nested (so I can copy a CMake project into mine, and automatically use their CMakeLists).

Project: Create a Simple QT App

  • RoboJackets/qt-example(http://bit.ly/2fTIPfL)
  • This will help you create a basic QT Gui compiled with CMake!
  • This is a old project, and it might be confusing, so we'll be here to help you out.
  • Let us know if you have questions.