QT Framework Overview

Qt is a powerful cross-platform application framework used for developing GUI (Graphical User Interface) applications Qt provides various tools, libraries, and APIs for building applications that can run on multiple platforms, including Windows, macOS, Linux, Android, and iOS.

Qt has its "write once, run anywhere" philosophy, which allows developers to write code once and deploy it on different platforms without significant modifications. Qt has this cross-compatible feature set.

Qt's architecture is based on the concept of signals and slots, which enables easy communication between different components of an application both between the C++ backend parts and with the frontend Code components.

Many times we get confused about the different QT tools and terms because maybe they all start with Qt. I have made the following table can help you have some more information in this regard

.ui format 

Ui file is the old format for designing desktop GUI App

It is the older QT Gui file format 

.qml format

QML is the new format to design cross platform applications . materialistic design 

QML is kind if of a programming language 

QtQuick 

Qt Quick is a software framework holding buttons , text fields etc 

QML is the language to work with Qt Quick 

Qt Designer

This is a graphical tool to make ui file 

Ui file is older Qt Widget desktop application type  

Qt Design Studio 

Can work with both .qml and .ui format file 

Previously it was known as Qt Quick Designer 

QtCreator 

It is an IDE where you can write both C++ code and it has Design options

to work on QML and ui file 


It is used for creating a project out of QT SDK versions 


You need to Link a SDK to Creator IDE 

But there are dependencies for example using QtCreator 11

you cannot create a project targeting Qt SDK version 5.14 .


You need to use QtCreator 4.14 for that 


QT SDK 

This is the main SDK . it has different versions 

For example QT 5.14 SDK 

QT Maintenance Tool

You can use this to add/remove/update all the above components 

To use it you need an online registration 


QT Widget vs QML 

widget is powerful for native classic desktop applications and QML is for overall all platforms . Qt Creator IDE itself is created using Qt Widgets .

Qt Widget file format is ui format and can be designed using Qt Designer .











QT Creator Examples

There are a lot of QML examples in QT Creator.Search by QML and you will find many



In QTCreator you can enable QT Design option in the following way. Afterwards you can design QML in QT Creator IDE itself .



With QML, you can create rich, dynamic UIs using a declarative syntax that's more intuitive
Moreover, QML seamlessly integrates with Qt's C++ backend, enabling you to leverage the full power of the Qt framework while benefiting from the flexibility and agility of QML for UI design.

Additionally, QML offers excellent support for different user interfaces that can easily scale across different screen sizes and orientations on a wide range of devices, from smartphones and tablets to desktops and embedded systems Displays.

So if you're starting a new Qt project or considering migrating an existing one, embracing QML would be the Ideal choice


Embedded CI/CD with STM32 (Part-1) : MakeFile Based build System



It's usual for us Embedded System Engineers to rely solely upon an IDE provided by the Silicon Vendor to Write the code, compile, Flash, and Debug the target Microcontroller. For Example, While developing Application firmware for STM32 Microcontrollers, The Choice of STM Cube IDE is the defacto. Using the IDE we can do all the required operations but Have you ever thought of moving from IDE to a Command line-based compilation process?  In this short blog Post, we will find how we can move into such a mechanism and experience how this would bring new autonomy to our embedded development pipeline. 


Moving From IDE to CMD Line can bring a number of benefits to our overall project development process. Such as

  • Build commands can be wrapped into a bash script 
  • Faster Build Cycle by using all processor threads 
  • Ability to include Unit test step in the build process 
  • Prepares the Base Framework for arranging a CI / CD pipeline
  • Invoke Build Process on a new Git Commit push.
  • No need to depend on the IDE buttons anymore. 
  • Avoiding Manual Labours 

While using STM32 Cube IDE for the first phase of project Initialization, you have probably noticed that STM32CubeIDE can also Generate a Makefile for your project. Well, Once you have configured initial MCU settings such as GPIO, Clock, and different peripherals & have generated the Make File, from that point onwards you can move on to using the the command line only to build/compile your firmware. First I am going to show you how to set up an STM32 MCU project from the beginning to compile it in a bare-metal command line console depending on the Makefile 


Download https://www.st.com/en/development-tools/stm32cubemx.html  

Start CubeMX by Running the following command 

hassin@P51:/usr/local/STMicroelectronics/STM32Cube/STM32CubeMX$ ./STM32CubeMX

Create a new project and Start Configuring using the IDE 

First, we configure the Clocks 

Then We Configure the Peripherals such as USART 

Put Pin Labels using the Graphical Tool 

Configure Clock signal Routes 

Now Comes the Most important Settings Page. Here in the Code generation page, Select Makefile 


Then we need to click on Generate Code 


After Generation, the FileSystem of the project will have the following tree
Then we test the building of the project using the Make tool

hassin@P51:~/projects2/stm32-cmake-bare$ make -j8


If you have followed everything correctly then you should get output like the following 


This shows that the default make-based build system is working. Now if you want you can flash the elf using any stm32 firmware flashing utility and check the code in hardware. But Remember our target is to automate all this process.

In this next Post, we will see how we can wrap this project under a CMake type Build System and move to the next level.

Categories

Pages

Firmware Engineer

My photo
Works on Firmware, Embedded Linux, Smart Metering, RTOS, IoT backend

Contact Form

Name

Email *

Message *

Copyrighted by Hassin. Powered by Blogger.