I plan to begin learning C++ GUI programming soon and I have decide to learn both wxWidgets and QT.
I just don't know yet which one should I learn first, I am more likely to start with wxWidgets though.
I know from what I read that QT is way more powerful and has a bigger online community but it doesn't use standard C++ and this is a big downside for me. I mean, I have spent all this learning C++ and trying to implement the best practices, use the newest feature to just go and forget all about it when using QT.
So what I am asking is if my concern is real. Can I use QT and use only standard C++ and if needed use the QT's occasionally or the standard C++ won't work well in QT?
A lot of Qt’s framework was developed before C++ had a standard library, so you do get a lot of duplication of ideas.
Qt’s classes are quite a bit more... comprehensive than C++’s, but you can often convert between the two easily enough when needed.
As there is no point in trying to memorize the Standard Library (keep a link to cppreference.com) there is also no point in being pedantic about only using the Standard Library.
wxWidgets is also very nice, but it is a bit of a step-down from Qt in both power and ease of use.
“Best practices” are about correct code, not about which library you are using. Use the library most useful to your goals.
Give them both a quick tryout, then go with the one that most agrees with you. :O)
It's common in Qt (when using QObjects) to create an object on the heap (using new) and immediately give it to a "parent" object which takes ownership of the object. You don't delete it; the new parent will delete it when the parent destructs.