tags:

views:

527

answers:

7

I already know C++ console programming. So shall i learn Qt for c++ or c# first?? I eventually plan to learn both anyways. Also, how long will each one take. The only programming language i know is c++.

A: 

C# is quite a painless way to enter the world of GUI programming, so I'd recommend starting there. It's a bit of a line-ball, since Qt/C++ has the advantage of using a language you already know, but the Qt framework definitely has a steeper learning curve than .Net.

Marcelo Cantos
Steeper? I have not noticed...
EFraim
I've used both, and found it substantially easier to get to a real-world usable app with lots of complex UI elements in .Net than with Qt.
Marcelo Cantos
@EFraim I had about 4 years experience with .NET/C# and then 2 years with Qt/C++/Python and I like Qt very much, BUT I had to say that UI framework's API staightworwardness, design, and even feature-list of Qt sucks comparing with .NET.Qt is very flexible and customisable, if you think of rewriting from scratch is customising, but if you want some high-powered components out-of-the-box, you should use .NET, Cocoa or Delphi.IMHO.
Max
@EFraim But when you actually need to obtain totally new interface, having appearance and behaviour you want to have -> Qt is definitely your choice. Qt's API's are well-designed and clear to the very deep layer.
Max
+4  A: 

As has been mentioned already, it really is a personal decision. I think the most effective way to decide is to choose what you'd like to build with the language and then choose the language that seems to have the features that would make the project the most enjoyable.

A few observations I've made as I've worked with both languages might give you a little insight:

  • If you're interested in web development, ASP.Net with C# is a lot of fun. There are days when I miss working in Visual Studio and quickly building useful sites.

  • In my experience (that is, unfamiliar with both before trying them out), Qt and C# seem to be about the same learning curve for GUI development. Visual Studio is great at making things as easy as possible but Qt has some helpful tools as well (Qt Creator, Designer, and Assitant).

  • If you would like to target multiple platforms, Qt is probably the better choice. Mono continues to improve but it's still not quite as polished as Qt for cross-platform support.

  • If you enjoy the flexibility and power of C++, Qt manages to add more (like Signals and Slots) while removing some of the pain (thanks to its class library).

  • As for time to learn, they each took about the same amount of time before I felt reasonably comfortable (a rough estimate, maybe 20-30 hours of working with each language).

Whether you learn C# or Qt, you'll become a better programmer simply by thinking about and solving familiar problems in new ways. That can't be a bad thing, right?

lostriebo
+9  A: 

Qt - as it is very easy to write GUI with it, it is cross platform and you use language you know

Artyom
A: 

C# is much easier to learn than C++ so I'd recommend starting with it. Another option would be C but it's pretty boring mostly for just Console work vs. Windows GUI (and not too relevant today).
C# is a great language to learn for web work or windows applications. C++ is good if you are wanting to get into complicated game development or must have a single exe (not requiring .net) and the speed of the application is far more important than the time it will take to program as C++ will take much longer to develop.

Chad Biggerstaff
A: 

Like others have said it's all about what do you want to do. I use Qt for C++ and i like it, the biggest plus about it is that you can have fun writing applications for mobile devices like symbian phones and windows phones(i think windows phones can also have applications made in C#) and using the webkit engine to do hybrid apps.

If you want to do only desktop and mobile Qt will do but if you want to make things like web sites and web services then C# is probably a better choice. Those things can be done with C++ to but it is a bit harder and takes longer(but not impossible see gsoap for web services and http://www.webtoolkit.eu/wt for sites). Also if you want to get a job i think (not sure) that there are more jobs available for C# and .net than c++\Qt (maybe that will change now that qt supports symbian and maemo). Whatever you choose you can always switch as there are many similarities between them.

Hope this helps.

Olorin
+2  A: 

here's what I would do: try learning both of them at the same time (e.g. dedicate 50% of learning time to each of those 2 technologies); reasons:

  1. both technologies are not a rocket since; you shouldn't get overwhelmed with the amount of the new information coming to you;

  2. both are fun and exciting to learn; I believe you would get better understanding of them by comparing approaches for s\w design using QT framework with c++ vs .net framework with c#

QT is not only c++; you could use it with python (pyqt); so I would add python into your list of the new tech to learn

serge_gubenko
yeah, i think i will go with this..learn both together.
myax
A: 

Since you want to lean both then you should learn Qt first because in Qt/C# (Qyoto), many things are same as Qt/C++, specially signals and slots.

Sharique