Question about QT Framework

I am brand new to working with frameworks and I just finished watching a few tutorial videos on QT. QT seems great and all but I feel like it's forcing me away from my roots in C++. For exampling when declaring a string its now "QString" or myFile.open(QIODeivce::ReadOnly). I just feel like I'm overwriting loads of things that I've learned from C++ with all of these new commands. I'm really just wondering if this is what coding at the next level is all about? If it is that's fine I just want to make sure I'm going in the right direction here.

Thanks for any input.
Last edited on
You're not moving away from C++ - you're just using C++ classes and libraries that have been written by a third party, rather than writing them from scratch yourself.

Which, really, isn't much different from when you use things from the standard library. You didn't write the std::string class yourself either, did you? You use the std::string class that someone else wrote when it's appropriate, and now you're using the QString class that someone else wrote when that's appropriate.

Using 3rd-party libraries is a big part of coding in C++, if you want to be productive.
@MikeyBoy

Thank you for your input, but now a new question comes to mind.

Why even learn the iostream library if it's not used in other frameworks like QT?
Qt is just weird. Most frameworks don't recreate large portions of the STL.
This is a little before my time, but I read an article online somewhere that explained why QT was written this way. According to the article, the reason QT implements its own stl containers, for example, is because QT was written before there was a standard library. So there was no std::vector or std::string at the time.
Hi,

Here are a couple of articles as to why Qt uses the macro and moc.

http://www.bogotobogo.com/Qt/Qt5_Q_OBJECT_Macro_Meta_Object.php
http://doc.qt.io/qt-5/why-moc.html


These are central to the way that Qt works, so I guess that is why there are a lot of classes that look as though they do the same thing as their STL counterpart.
Thank you all for your input, wish C++ had its own integrate GUI Library D:
.... wish C++ had its own integrate GUI Library


C++ only concerns it self with standard C++, so we have the STL, anything else such as GUI, graphics, DB etc are all left to third party libraries.

Good Luck !!
Topic archived. No new replies allowed.