
Background Knowledge:
There are many frameworks and graphics toolkits for cross platform development. The main 2 that are used by linux users are GTK and QT. I personally prefer QT, however I will explain how to use GTK as well in this post. The fundamental difference between the 2 is that QT is it’s own framework, and has a specific build system for QT applications (a particular engineer I know also used that build system to program STM32 controllers). GTK however is a toolkit, which allows for slightly simpler code, but harder to visualize.
Quick Run:
QT enforces an Object Oriented Programming structure, which is bad from a computer science direction. As object oriented does not have a mathematical representation making it unprovable, this in turn relies on unit testing to ensure the program does not fail. However this is good from a practicality standpoint, as it allows us to compartmentalize the code in similar way to what most people do internally. The main benefit from QT is that QML is a nice DSL for programming a the layout.
Here is some code for a tic tac toe game in QT5. While it is more than tic tac toe code for GTK, it also uses more common techniques that are taught in software engineering. On top of all this it allows for more complex designs to take place and simpler modification in the runtime of the program, which is why QT based applications seem to have more settings/options in them.
Here is the GTK tic tac toe. This is more imperative based allowing you to code in C as opposed to C++, which is good for low level applications. It is just more complex to connect signals to slot functions in comparision to QT from my personal experience.
Most Important Tidbits:
Unfortunately this is mostly a personal preference which to use, and there is no really interesting tidbits in this section.