2

I'm a long-term Linux user and an 'advanced' Python programmer. I'm recently having some spare time on weekends and I'm beginning to learn C++.

I'm using Qt Creator for development because it has nice features and is simple, blazing fast and I also plan to program Qt applications in the future, so it's gonna be straightforward if I'm already used to something like Qt Creator.

I like features such auto completion, decent code highlighting, visual assistance for debugging, and these kind of modern features, as long as they don't stand on my way.

However, a lot of people are telling me that if I really like those feature I should use Visual C++ and Visual Assist (a plug-in). A friend brought his notebook with Visual Studio here and my first impression was that it's too much complicated, with thousands of menus and uncountable icons and information on screen.

I couldn't actually test it for productivity and precision because he couldn't borrow me for a long time.

So, my question is basic; considering the features of the latest Qt Creator (2.2.1) does it worth to buy all that softwares (Windows, Visual C, Visual Assist)?

Is it possible to configure those softwares to aid me in cross-platform programming?

Thank you in advance.

Manfred B.
  • 21
  • 1

5 Answers5

2

When you are just starting with learning C++, Qt Creator is a good choice. Its features are sufficient and the IDE is simple so it will not disturb you from learning C++. Qt framework is inherently cross-platform, while VS is not.

On the other side:

  • Basic version of Visual Studio is free (it cannot be extended with plugins, though)
  • You can do Qt development in Visual Studio via the addin

I would choose Visual Studio & Visual Assist for developing larger software, due to

  • VS debugging facility (which is far better than that in Qt Creator) and
  • VS Assist's refactoring and navigation features which can speed up daily work in IDE much (although Qt Creator has Rename refactoring and VS without pluings has not)
jirkamat
  • 1,776
  • 2
  • 15
  • 17
  • Thank you. What about cross-platform programming with Visual Studio? Is it possible to use GCC to compile the programs? If not, do I have to buy a compiler separately? Sorry so many questions. – Manfred B. Aug 16 '11 at 18:27
  • @Manfred: Visual Studio has compiler built-in. Qt Creator can use Visual Studio's compiler or Mingw on Windows, and GCC on Linux. Why would you use GCC with VS? I think this is impossible (and does not make much sense). IDE does not make your code cross-platform, just the code itself either refers to platform-specific functions or not.. – jirkamat Aug 16 '11 at 18:44
  • Thank you again. I know it's the code that has to be cross-platform, but my question is if Visual Studio will warn me when i'm writing platform-specific code, or even if it's a mode in which it compiles with compatibility options. Sorry my ignorance. – Manfred B. Aug 16 '11 at 18:57
  • @Manfred: Oh, I understand now :) No, it won't. Even worse: it will suggest you using Visual-Studio-only functions (eg _snprintf) instead of standard ones (sprintf), saying that the first one si memory safe (which is probably true). Generally, I can think of two things that make code platform specific. One is functions specific just to compiler. And second group are functions specific to operating system - e.g. Windows API. – jirkamat Aug 16 '11 at 19:11
  • It won't 'suggest' those alternatives if you start typing 'sprintf' then that's what you'll get. There's an entirely separate issue about the use of the Secure CRT, and if you want to keep things portable (but less safe) then just define _CRT_SECURE_NO_WARNINGS in the project – the_mandrill Aug 16 '11 at 21:07
2

Executive summary: you don't need visual studio to learn Qt on windows. Why not learn Qt on linux? Same library :)
If you like the Qt Creator IDE, note it's as cross platform as Qt. For windows there's a binary package that includes the IDE, prebuilt Qts and mingw (which is basically a port of gcc to windows), which you can use to produce native executables. For linux it will just use the system compiler and Qt. For Mac it will use the system compiler. Windows is the only one that doesn't come with a compiler built in.
Oh, you don't have windows. Having some windows programming experience might increase your marketability if you care. Do you? :)

Torp
  • 7,924
  • 1
  • 20
  • 18
  • Thanks. After reading the last answer by jirkamat(thank you) I'm almost giving up on the idea of using Visual Studio. If it doesn't respect the C++ standards it worths nothing to me, no matter how easy it is to develop. I'm thinking about buying Windows, but the low cost versions are limited and the fully-featured ones are too expensive. I'll buy another HDD and download a trial version of Windows to check it out. Thank you. – Manfred B. Aug 16 '11 at 19:37
  • 1
    Ignore what you hear about it not respecting standards. Microsoft's research found that most crashes and security problems stem from buffer overruns, so they created an [alternative](http://msdn.microsoft.com/en-us/library/8ef0s5kh%28v=vs.80%29.aspx) set of C run time functions that are more secure. As the developer, it's your choice whether you use them or not. If not then you can write portable C++ without any worries (if you're using Qt). The VS debugger is excellent, especially when used with the Qt addin to display Qt types. – the_mandrill Aug 16 '11 at 21:12
0

I will advocate KDevelop4. It's designed for C++ and DUChain gives you good programming hint.

xis
  • 24,330
  • 9
  • 43
  • 59
0

While I am a Visual C++ fanatic, and I use it for almost everything I develop - I wouldnt advice you since you want to develop using/on QT. Better use free tools which do support QT and cross platform development. VC and VA are definitely beyond-repute development tool couple on Windows/C++, but your requirement doesnt fit these costly products.

Get a evaluation/time-limited copy of Windows, get Eclipse/NetBeans/other-developement-IDE or Visual Studio Express, install all prerequisites for QT developement and get started. After a month or so, you yourself decide if you need VS/VA or not.

Ajay
  • 18,086
  • 12
  • 59
  • 105
0

If you have money and limit yourself to Windows, then you should. If you're not, stick with Qt Creator. It is the best free, lightweight, good autocomplete I've used ever.

A.H.
  • 63,967
  • 15
  • 92
  • 126
Kokizzu
  • 24,974
  • 37
  • 137
  • 233