
Show HN: Crash course in Qt for C++ developers – a blog post series - AlexFagrell
Hi guys,<p>Two days ago I published the fourth post in the series and thought it would now be a good time to look for additional feedback here on Hacker News.<p>The aim of the series (as mentioned in the first post) is to inspire more people to start using Qt. My ambition is to answer the following questions &quot;what is the gist of Qt?&quot;; &quot;what is the 20% that you need to know to develop 80% of the application?&quot;; &quot;what are the perhaps unknown unknowns?&quot;. In other words, I&#x27;m just covering basics: enough to understand the concepts and where to find additional information should you need it.<p>Do you agree with the direction of the series so far? Here is the link to the first post:<p><a href="https:&#x2F;&#x2F;www.cleanqt.io&#x2F;blog&#x2F;crash-course-in-qt-for-c%2B%2B-developers,-part-1" rel="nofollow">https:&#x2F;&#x2F;www.cleanqt.io&#x2F;blog&#x2F;crash-course-in-qt-for-c%2B%2B-d...</a><p>I appreciate your time and would be very happy if you had any feedback.
======
chaoz_
I really like the idea. IMO, Qt makes C++ suitable for wide variety of
applications.

I learned Qt by reading the source code of default QtCreator applications
(like Rich Text Viewer). After you know about SIGNAL/SLOT architecture and
pImpl idea you can pretty easily derive it from well-written code. It will
also teach you good practices! It was the most efficient method for me and
many of my friends.

This way your posts will really look like the "course" and not like
"documentation + my comments".

Keep it up!

------
joezydeco
When I walk people through Qt, I usually start with the QObject/QWidget class
setup, show some basic UI elements, create a "Hello World" QApplication, then
walk into signals and slots.

The event system is usually something a neophyte Qt programmer hardly ever
touches. I don't know if I would lead off with that.

 _(psst..also: blog posts really shouldn 't go under Show HN. Check the
rules)_

~~~
AlexFagrell
Hey there! Thanks, great comment. I'm considering rearranging the topics when
it's finished.

My thinking was that the event loop is one of the first thing that you'll
encounter, i.e. app.exec() in main, when using Qt. The fact that the flow of
the app is event-driven is important to understand when working with a GUI
toolkit and thought it would be good to introduce early on (even though you
rarely use the actual event system itself). Perhaps not as a first topic
though.

Yeah, I realised that it shouldn't be Shown HN, but can't find a way to edit
it, thanks.

Appreciate the feedback, cheers!

~~~
geezerjay
> My thinking was that the event loop is one of the first thing that you'll
> encounter, i.e. app.exec() in main, when using Qt.

Technically that's true, but as the event loop runs under the hood then the
event loop doesn't assume a prominent role in Qt's mental model.

~~~
joezydeco
Yeah, geezerjay has it right. For a new programmer trying to get a "crash
course" in Qt, app.exec() is a black box you don't really need to mess with.

You can explain that it drives all the mouse, keyboard, and QTimer signals
when you begin to implement the event slots on your widgets, but as far as
getting an app to run it's a matter of calling app.exec() and leaving it
alone.

~~~
AlexFagrell
Thanks again! I agree with you!

