Advice for someone getting started with learning Qt

Spend as much effort as possible in learning to use Qt’s Model View Delegate functionality. It can be a lot of work to wrap your head around, but once you get there, you can do very powerful things with it.

One of the most confusing things to me was that when your model is very complex, you might not want to have your core model class be a Qt model at all. Instead, I nowadays see Qt models as something that primarily provide data to views. If your model is very complex, you might want to use your actual, more complex model as a data source for the Qt model class (an QAbstractItemModel derivative), which in turn attaches to the UI view.

Another relatively tricky topic you will want to invest learning resources in is memory management and how Qt facilitates (and doesn’t facilitate) it.

Of course, Qt documentation is your friend. Qt is a wide framework and contains LOTS of useful functionality. I love the data structures in their ease of use, for example: QHash, QList, etc.

Project scaffolding features for beginners, for different project types in Qt Creator might indeed be useful. For now, the Qt Examples actually are quite good ones, and contain lots of good practices. You just need to pick and choose what you need.

I have been developing our Qt desktop app family for five years now. Our directory structure is quite unorthodox – the main thing is that we have lib/ under which we have grouped different related functionality in subdirectories. The thinking goes, if something is in lib, it is general-purpose and atomic enough to be used in several of the actual desktop applications in our software family.

Original at StackOverflow

Hey! What did you think?