A thread about C++/Qt development

Hi Sup Forums.
I've decided to start learning a different programming language, C++, for my daily use. What can I expect? Any tips? My background originally is in C# .NET, but with the direction Microsoft is going in, I'd rather not stick with it. As an extension to C++, I'm probably going to focus on using the Qt framework for my gui needs.

Also, thinly veiled KDE thread. Discuss your C++/Qt/KDE related development here.

Other urls found in this thread:

msec.it/blog/?page_id=11
twitter.com/NSFWRedditImage

Bump. Come on Sup Forums, stop posting in those silly generals and get your butts in here!

I fucking love the new KDE dragons

Bumping with more Konqi.

Hi, qml is pretty nice in general and qt5 is very well documented, you could try looking at the source code of this small program for example, it works on android and windows phone too:
msec.it/blog/?page_id=11

Well there is KDE and there is Qt.
KDE has very nice defaults compared to Qt, but Qt is easier to make if you don't want as many dependencies.
C++ is a decent language, you can make it fast and you can have high levels of abstraction if you want.

I would suggest that you start by learning the STL, Then learn what you think is relevant of boost, then Qt and then a library in the field you are using.
That should probably be all you need for a long time.

Will Qt library help develop my waifu for me

>What can I expect?
Long compilation times, even with so called """"incremental builds"""".

>Any tips?
Don't use some costly modern C++ language features or template turing completeness for the sake of being modern and egdy. You will pay with compile times and readability.
However, embrace nullptr instead of NULL and enum class.

Thank you, I'll keep those tips in mind. Up to this point I've been mostly busy getting used to KDevelop and reading from C++ Primer.
Another question, will I be able to make Windows applications using the Qt framework instead of Windows forms? I've read about Qt being rather multiplatform.

yes.
You could try out QtCreator, While it is not build for large projects, it is very good on small. It comes with a graphical designer for the layout.

>Don't use some costly modern C++ language features or template turing completeness for the sake of being modern and egdy.
I'm an old fashioned guy, I'd rather keep it simple.

I honestly don't know why anybody would use C++ for writing application software when there is Object Pascal out there.

Fair enough.

You know OP, you got me inspired how to solve the problem that peoplel don't want to use condoms.
There has to be a comic series with condoms as people, completely cute and innocent, like those dragon things.
Then even Sup Forums like , bronies and other degenerates will want to have sex with them.

He has a point, OP. Even the glorious pic related was written in it.

>I honestly don't know why anybody would use [not my favourite language]for writing application software when there is [my favourite language] out there.

Thanks, I'll be sure to check it out.

Tell me about it. What makes Object Pascal better?

Here's another Konqi, go change the world.

That thing is really cute.

...

...

>What makes Object Pascal better?
Literally everything? Faster compiler, better handling of strings, more portable, fewer SJWs, I could go on...

>better handling of strings
can you give an example?
>more portable
like where? C++11 compiles to all the major processors.

1) Start with some C++ and Qt. IMO do not use QML unless you have some knowledge about Qt if you want to master C++
2) In my experience, Qt is much better than winforms and WPF. Especially the QtDesigner part - just put widgets and make layouts for them, receive scalable UI that works in way you want.
3) Try to avoid raw pointers - use any kind of smart pointer. Exception from this rule is QObject cooperation - QObject (base class for objects in Qt) is owner of child objects (and child object own its child object - a tree hierarchy). For example, windows owns buttons and labels - and this means if you destroy a window, all labels and buttons are deleted. So you type code like "new QLabel(this)" and keep in raw pointer just for convenience.
If you use non-Qt classes try to use smart pointers like std::unique_ptr or std::shared_ptr. "Smartness" means "I delete that pointer for you". It makes less error prone and more happy developer. And suddenly you discover that you do not type "delete", your code is as simple as C# and memory is managed properly without GC.

...

Hi again, yes, in fact afaik windows forms is already deprecated in favour of wpf (i don't know if wpf is used in the uwp apps tho). Actually the toolkits are the ones who draw the GUI, you can use any other for making user interfaces in windows for example wxwidgets.

>Faster compiler
It might be faster, but isn't that at the cost of language features? Also note that I do not consider the .NET compiler to be particularly fast. And I'm not even going to start about Java.
>More portable
I doubt anything is more portable than C++.
>fewer SJWs
I also highly doubt I'll find any SJWs while working with C++, aren't they all using python or whatever flavor of the moment javascript shit anyway?

>just put widgets and make layouts for them, receive scalable UI that works in way you want.
That's pretty fucking neat.
>QObject (base class for objects in Qt) is owner of child objects (and child object own its child object - a tree hierarchy). For example, windows owns buttons and labels - and this means if you destroy a window, all labels and buttons are deleted.
This is the one thing that always bugged me about Windows Forms, you could remove the form and still have a bunch of shit flying around in memory.

>My background originally is in C# .NET, but with the direction Microsoft is going in, I'd rather not stick with it.
i think this is a good decision, one of the reason why windows keeps the exclusivity of a lot of programs and games is because MS know that if a program is made using one of their tools it'll be immediately incompatible with non-MS platforms effectively making not economically viable to port the program to other platforms because it would imply rewriting a large part of the program. I believe this trend is slowly changing thanks to the fact that android got a huge marketshare burning those developers who put all their eggs in Microsoft's basket making them work twice to get a piece of that cake. For the simple possibility if a new platform rising suddenly i think as a developer that putting all your eggs in one basket is a bad idea, this is why i think there's now a demand for multi-platform technologies. Multi-platform and choice for the users is the future imho.

>5000$ for IDE

>C++ and portability
With Qt you can be impressed that you can develop your application on ex. Windows and have it running on Linux or Mac without single line of code changed. As long as you stick with Qt and do not use platform-specific features you have perfectly portable code.

And IDE of my choice is QtCreator for C++. It is hilarious to me that MSVC without paid plugins feels so raw in features and bloated with some useless stuff. QtCreator provides at least method generation (type method declaration in class, alt+enter and bam. works also in reverse order, type definition first and have your method put in class) and refactoring that is not just rename-globally-stuff-cause-context-is-difficult. Maybe simple features but this make life easier.

This describes my reasons for leaving .NET behind pretty well. I'm also worried that with Windows 10 and Xamarin being as shit as they are, C# and .NET will eventually become a pile of agony.

I'm currently using KDevelop with QtCreator on the side, didn't know QtCreator was a fully fledged IDE on its own.

Well, it's been a nice thread.
I'm glad I got to see the non-autistic Sup Forums for once. Feel free to use this as a general KDE thread.

thanks op for one of the few good threads in some time.

I want to put my penis inside Konqi.

Lazarus is free