|
I've been working with Qt for a good while now (about a year), got some tips written on that topic.
Important: Qt has two RegEx engines. QRegExp is old, outdated and not maintained. [1[^]]
If you plan on doing GUI stuff with Qt, I strongly recommend QML[^] instead of QWidgets (QML can be used on any platform, but QWidgets can't).
You may also find Multi-Threading Tutorials where they recommend you to overload the run() method of QThread - Don't do it, they have changed that to a more secure and more customizable way: http://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/[^]
If you have a Mac where you want to install your Development Environment, you have to watch a few things[^]
(Linux and Windows installers from the download page work out of the box).
Apart from that, be warned that tutorials for earlier versions may not reflect what is recommended to be done when using the latest 5.2.1 release.
Signals and Slots are a PITA at first, but after a while you get a pretty good hang on it. Always watch the console output of the debugger, if you made a typo while connecting them it will not be shown before runtime.
So, and if you got any more questions you can either ask me or someone at the Qt forums[^] - They're usually pretty quick with answering questions.
I'm currently writing The big Qt cross platform Desktop introduction[^], but it is far from being finished yet, since I only started writing a few days ago.
Edit: It is also Qt, and not QT. If you search for QT, you are quite likely to get results about QuickTime [or get flamed on for writing QT instead of Qt].
I will never again mention that Dalek Dave was the poster of the One Millionth Lounge Post, nor that it was complete drivel.
How to ask a question
|
|
|
|
|
'K. Thanks.
What do you get when you cross a joke with a rhetorical question?
|
|
|
|
|
No big deal. Happy Learning
I will never again mention that Dalek Dave was the poster of the One Millionth Lounge Post, nor that it was complete drivel.
How to ask a question
|
|
|
|
|
Now you show up. I did a Qt project last year, and it tweren't easy .
Software Zen: delete this;
|
|
|
|
|
I was probably a beginner myself when you did it
I don't see myself as Qt Pro|Guru, just as someone who ran into the common traps already and can guide beginners around them
I will never again mention that Dalek Dave was the poster of the One Millionth Lounge Post, nor that it was complete drivel.
How to ask a question
|
|
|
|
|
(Good reply Marco. And good luck with the book I think we need a good new book on Qt. )
If I may add my few cents to that:
C++ programmers know there are many ways and styles to use C++. Try to find out the Qt way of doing things. Its a good way, and it saves you a lot of time.
For example:
Make sure you understand the implicitly shared data types, and the smart pointers. They save you a lot of effort.
QML is definitely the way to go, IMO, not just for cross-platform.
For databinding to the UI (QML), I like QProperties, but there's a lot of ceremonial code required for them. You need to find a good snippet, macro, code-completion thingy in your IDE to take care of all the typing you have to do for them.
An alternative to QProperties, if you have dumb objects consider using QDeclartivePropertyMaps. They're a quick way of making simple objects that automatically bind to your QML.
I have some other tips in this blog post/[^].
Good luck.
|
|
|
|
|
You got some good points there
Sean Hopen wrote: And good luck with the book I think we need a good new book on Qt.
It's an article on CodeProject, not a book
I will never again mention that Dalek Dave was the poster of the One Millionth Lounge Post, nor that it was complete drivel.
How to ask a question
|
|
|
|
|
|
It's a nice book, no doubt. But Qt is already at version 5.2.1, and I'm not sure if this book covers 'hot' topics as QML (for example) accurately.
Don't get me wrong, it's good for a starter but as soon as you want to support Android|iOS|WinRT that book won't probably help much. Qt is a cross-platform framework, and a GUI written with Qt technologies shall support all available platforms (IMHO, at least).
I will never again mention that Dalek Dave was the poster of the One Millionth Lounge Post, nor that it was complete drivel.
How to ask a question
|
|
|
|
|
Depends on which version of Qt you want to use. The principles are the same but the locations of the header files are completely different between Qt3, Qt4 and Qt5.
|
|
|
|
|
Highway To Oh Look Kittens!
|
|
|
|
|
Get your Coat, Now! Shouldn't that be AC/HD anyway??
|
|
|
|
|
You're thinking of OC/D .
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
|
Awww... Abbey Roadkill.
Will Rogers never met me.
|
|
|
|
|
|
AD/HD featuring Scrotum Young, Drill Thudd, Knob Rott, Anus Old & Spliff Millions with their hit album Highway to Distraction.
Yes I know about them.
I can count to at least five cover/tribute bands with that name and (atleast) one with the name AB/CD.
Oh and not to forget, atleast four bands with the name OCD/C.
|
|
|
|
|
|
|
No, they're sheep. - if you can't tell the difference...
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Those who seek perfection will only find imperfection
nils illegitimus carborundum
me, me, me
me, in pictures
|
|
|
|
|
... you are Welsh.
I will never again mention that Dalek Dave was the poster of the One Millionth Lounge Post, nor that it was complete drivel.
How to ask a question
|
|
|
|
|
Is it a blowjob contest?
Because the nearest one from the photographer seems about to win ^^
[Flags]
public enum Bool {
True, False, ForSure, Maybe, ProbablyNot, Depends, NotDecidedYet, Undefined
}
private interface IShy { }
|
|
|
|
|
I'm with Bassam on this one...
Sorry to Bassam I don't always spell names wrong, but when I do the typo strikes Bassam
I will never again mention that Dalek Dave was the poster of the One Millionth Lounge Post, nor that it was complete drivel.
How to ask a question
|
|
|
|
|
|