You are not logged in.

#1 2016-02-06 23:59:03

bokiscout
Member
Registered: 2015-09-27
Posts: 24

Qt framework - tutorials

Hi,

Except the examples published at qt's documentation page (http://doc.qt.io/qt-5/qtexamplesandtutorials.html) I need recommendation for some book or tutorials, or whatever resource to begin learning it. Here is the thing:

1. I need recommendation for briefly walkthrough Qt to learn the basics as fast as possible, then
2. I need recommendation for book or something to learn Qt thoroughly.

Note that I'm fine wit C++, I need to learn how to use Qt framework only.

Thank you.


What's the object-oriented way of becoming wealthy?
- Inheritance

Offline

#2 2016-02-08 13:59:18

hrobeers
Member
From: Belgium
Registered: 2008-11-05
Posts: 79

Re: Qt framework - tutorials

I don't know a good book, as I learned Qt from the docs.

But the most important thing to learn is Qt's event system. Because objects referenced in event's should only be destructed after an event run (or whatever it's called).
That's why the deleteLater function exists.

These pages should give you a good overview:
http://doc.qt.io/qt-5/qcoreapplication.html
http://doc.qt.io/qt-5/qobject.html#deleteLater

I'm not really a fan of Qt's parent child memory management for stuff other than UI.
That pattern is described here: http://doc.qt.io/qt-5.5/objecttrees.html
I prefer to use the following deleter for QObjects:


struct QObjectDeleter { void operator()(QObject* ptr) { ptr->deleteLater(); } };

template <typename T>
using qunique_ptr = std::unique_ptr<T, QObjectDeleter>;

Last edited by hrobeers (2016-02-08 14:25:09)

Offline

#3 2016-02-08 21:04:35

akrep55tr
Member
Registered: 2013-11-20
Posts: 10

Re: Qt framework - tutorials

https://www.youtube.com/playlist?list=P … A4688E9D63

This is for Qt4 but it also works for Qt5.

Offline

#4 2016-02-09 23:54:55

bokiscout
Member
Registered: 2015-09-27
Posts: 24

Re: Qt framework - tutorials

@akrep55tr: Those video tutorials are really good source for learning. I'll start with them, then I'll take a deep look into other sources if needed.

@horbeers: Nice tips.


What's the object-oriented way of becoming wealthy?
- Inheritance

Offline

Board footer

Powered by FluxBB