[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
A thread about C++/Qt development
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 33
Thread images: 15
File: kde.png (104 KB, 500x537) Image search: [Google]
kde.png
104 KB, 500x537
Hi /g/.
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.
>>
File: mascot_konqi-dev-kde.png (2 MB, 3497x4947) Image search: [Google]
mascot_konqi-dev-kde.png
2 MB, 3497x4947
Bump. Come on /g/, stop posting in those silly generals and get your butts in here!
>>
I fucking love the new KDE dragons
>>
File: mascot_konqi-app-system.png (856 KB, 3173x3508) Image search: [Google]
mascot_konqi-app-system.png
856 KB, 3173x3508
Bumping with more Konqi.
>>
File: dukto.png (140 KB, 950x474) Image search: [Google]
dukto.png
140 KB, 950x474
>>54789359
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:
http://www.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.
>>
>>54789359
Will Qt library help develop my waifu for me
>>
>>54789359
>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.
>>
File: mascot_konqi-app-hardware.png (943 KB, 2480x3508) Image search: [Google]
mascot_konqi-app-hardware.png
943 KB, 2480x3508
>>54789841
>>54789929
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.
>>
>>54790035
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.
>>
File: mascot_konqi-support-search.png (1009 KB, 3283x3973) Image search: [Google]
mascot_konqi-support-search.png
1009 KB, 3283x3973
>>54790005
>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.
>>
>>54789359
>>54789574
>>54789751
>>54790035
>>54790100
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 /g/ like >>54789586 , bronies and other degenerates will want to have sex with them.
>>
File: peazip.jpg (6 KB, 256x256) Image search: [Google]
peazip.jpg
6 KB, 256x256
>>54790124
He has a point, OP. Even the glorious pic related was written in it.
>>
>>54790124
>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.
>>
File: mascot_konqi-app-graphics.png (823 KB, 3218x3721) Image search: [Google]
mascot_konqi-app-graphics.png
823 KB, 3218x3721
>>54790091
Thanks, I'll be sure to check it out.

>>54790124
>>54790186
Tell me about it. What makes Object Pascal better?

>>54790162
Here's another Konqi, go change the world.
>>
>>54790258
That thing is really cute.
>>
File: konqi_dong.png (764 KB, 3218x3721) Image search: [Google]
konqi_dong.png
764 KB, 3218x3721
>>54790258
>>
File: 1369243528292.jpg (13 KB, 160x306) Image search: [Google]
1369243528292.jpg
13 KB, 160x306
>>54790305
>>
>>54790258
>What makes Object Pascal better?
Literally everything? Faster compiler, better handling of strings, more portable, fewer SJWs, I could go on...
>>
>>54790384
>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.
>>
File: does this ass do anything for ya.png (963 KB, 3283x3973) Image search: [Google]
does this ass do anything for ya.png
963 KB, 3283x3973
>>54790376
>>
>>54790035
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.
>>
File: mascot_konqi-base-framework.png (922 KB, 3076x3508) Image search: [Google]
mascot_konqi-base-framework.png
922 KB, 3076x3508
>>54790384
>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?

>>54790455
>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.
>>
File: photo_2016-05-27_20-22-57.jpg (154 KB, 957x717) Image search: [Google]
photo_2016-05-27_20-22-57.jpg
154 KB, 957x717
>>54789359
>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.
>>
>>54790124
>5000$ for IDE
>>
>>54790728
>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.
>>
File: mascot_konqi-commu-mail.png (903 KB, 2480x3508) Image search: [Google]
mascot_konqi-commu-mail.png
903 KB, 2480x3508
>>54790850
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.

>>54790946
I'm currently using KDevelop with QtCreator on the side, didn't know QtCreator was a fully fledged IDE on its own.
>>
File: mascot_konqi-app-internet.png (2 MB, 3497x4947) Image search: [Google]
mascot_konqi-app-internet.png
2 MB, 3497x4947
Well, it's been a nice thread.
I'm glad I got to see the non-autistic /g/ for once. Feel free to use this as a general KDE thread.
>>
>>54791434
thanks op for one of the few good threads in some time.
>>
I want to put my penis inside Konqi.
>>
>>54790862
Lazarus is free
Thread replies: 33
Thread images: 15

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.