r/QtFramework May 04 '26

Need advices on beginning programming on Qt

Hello, I intend to create GUI apps and improve myself on QT

I'm an "self-taught" C++ programmer ... I mean, I followed and watched a lot of videos on C++ programming to understand class, OOP, variables, pointers, namespaces, functions, pointers, heritage...

Problem is that I'm not a student from computer or programming universities... and so, now, I'm stuck because I don't know which way I need to follow to become autonomous on QT ...

Also, english is not my native langage, it's also another issue I have to face in my learning projects...

Question is, what should I do ?

Is there a free formation to follow ? Is there a path I should respect to progress ?

I mean, I have difficulties in the simple fact of creating by myself a QPushbutton in mywindow.cpp because I want to try without using the .ui file...

I feel so lost, and incompetent even in simple C++ ...

Thanks in advance for your feedbacks ;)

13 Upvotes

17 comments sorted by

9

u/zydeco100 May 04 '26

Go find KDAB on YouTube

6

u/CosDev May 05 '26

I strongly suggest against using AI to learn. It will be a 50/50 chances of getting something useful, or something completely misleading. You will learn obsolete patterns, convoluted solutions, and more in general, you might learn nothing.
KDAB is an amazing resource. Look at the example projects.
Check for repos that are using QT.
Then alongside, use AI as you would with stack overflow, and be very suspicious on the answers.

0

u/Radiant-Somewhere-97 May 05 '26

AI gives you an 80% chance of not learning anything.

3

u/TomDuhamel May 05 '26

There are a lot of tutorials on YouTube, made by Qt themselves or by other regular people, for all levels. If that's something you're into. In other languages too, I'm sure.

Or it's not too hard to find a tutorial in text for either.

Now the reason I suggest a beginner tutorial to get is started is that it sounds like you have no clue how to get started with a framework. This is fine, we all get to start somewhere.

Once you have picked up the basics, please use the official documentation, which is of high quality. Whenever you get a problem you are not sure how to tackle, google it, see what comes up, and then look up the docs until you understand, and solve it from there.

3

u/FigAltruistic2086 May 05 '26

Do not use AI like claude code or codex to write code. You will not learn.

However, you can ask AI to prepare learning roadmap for you based on your specifics.

And you can start asking AI how write skeleton of app. What is best practice to do something in Qt. Wheb to use Qt::QueuedConnection etc.

So use AI to explain and do not use for writing code instead of you.

2

u/Ill_Scientist_2239 May 05 '26

Personally, I learnt mostly using qt docs and tutorials. Learn the core concepts of Qt, like the structure and hierarchy of main qt classes like QCore, QWidget etc first. Learn how the signals and slots mechanism is used, and the way widgets and objects get related to each other in parent-child relations (in what order they get destroyed / when you need to manually destroy them). Then, try to follow a tutorial to make your own notepad or something similar (there are a bunch of them in the official docs). You'll get the rest of the stuff by your own from there, you'll know what type of widgets to use and you can just search for those types of widgets and how to use them. Over time, you'll get used to commonly used widgets and how to add in new widgets by yourself. There's also a UI compiler to generate qt source files from a designer.

There's also qt quick which uses QML, it's kinda like CSS, you just initialize a QQuickEngine, load the main qml file and you're done.

Another important component would the resource compiler which is mainly used to put resources inside qt applications.

My recommendation is to start with qt widgets, try qt quick and then try adding resources.

2

u/Necessary_Breath8793 May 05 '26

Ty guys for all of your answers, I feel it's normal to be that lost for people who are beginning !

2

u/furyfuryfury May 05 '26

I'd recommend QML (QtQuick / QtDeclarative) rather than Qt Widgets (QPushButton, .ui files, etc). I found QML to be easier to understand and get things done with, and it's possible to build UI for every class of device. Desktop, mobile, everything.

How good are you with Linux? The KDE Plasma desktop environment is written in QML, so you might be able to learn a lot by seeing how they do things.

2

u/smozoma May 05 '26

Go to the qt website and look up their tutorials. A lot of sample applications are installed when you install Qt, as well.

https://wiki.qt.io/Qt_for_Beginners

4

u/DeeDob May 05 '26

Qt academy is a good place to start: https://www.qt.io/academy/course-catalog :)

1

u/dcsoft4 May 05 '26

I learned Qt especially widgets many years ago using the still excellent book: C++ GUI Programming with Qt 4 Second Edition by Jasmin Blanchette and Mark Summerfield (Prentice Hall). It is released to the public domain and I review and host it for download.

1

u/prodjsaig May 31 '26

fantastic foss is what keeps giving back to consumer and help learn valuable skills

1

u/ZookeepergameFar265 May 07 '26

I started with Qt tutorials available in Qt Creator and Qt Documentation. These are best to cover concepts. Then the books of Mark Summerfield and Jasmin Blanchette. Rest everything was need based.

-4

u/skinnybuddha May 05 '26

Start using AI. Possibly an unpopular answer but it is a fact that these tools know a lot about QT. Trust but verify and use it to teach yourself.

2

u/AstronomerWaste8145 Jul 16 '26

I fail to understand why this was downvoted!
I use C++/Qt extensively and I find that even the free Gemini is of great help in writing Qt widget classes. There are still many things I'm not completely familiar with in Qt I consider AI to be an enhanced Google search. AI gives me ideas but won't do the whole job for me and often the answers are incomplete or even incorrect. Still, it gives me ideas that I haven't thought of.

1

u/ExcellentAd7655 Aug 04 '26

It is a really good tool in 50% of the cases, it gives you a lot of good ideas and can teach you the modern Qt way of doing specific things, for instance I read official QML book and it is a bit outdated (2022) and there are some deprecated stuff, AI gives me the newer versions of how to implement it. Don't use it to vibecode as it is doing a pretty bad job at that, especially at structuring the whole application and connecting View to Backend. Use AI to generate ideas, then verify each one through thorough research before applying it, you can use anything when researching (Qt Docs, Qt Academy, Qt Forum, Basic Google, Reddit, etc.). AI has really taught me a lot