Portal:Desktop: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Remove dead links)
m (typo)
Line 14: Line 14:


=== Choosing a Suitable Compiler ===
=== Choosing a Suitable Compiler ===
Qt is a C++ framework and works will all standard compliant C++ compilers. It's up to you which one you want to use. <u>If you don't have any special demands then do this:</u>
Qt is a C++ framework and works with all standard compliant C++ compilers. It's up to you which one you want to use. <u>If you don't have any special demands then do this:</u>


* On '''Linux''', use the '''GCC''' compiler that comes with your Linux distribution.
* On '''Linux''', use the '''GCC''' compiler that comes with your Linux distribution.

Revision as of 20:37, 16 September 2016

En Ar Bg De El Es Fa Fi Fr Hi Hu It Ja Kn Ko Ms Nl Pl Pt Ru Sq Th Tr Uk Zh

Setting up Your Computer for Application Development

Choosing a Suitable Operating System

First of all you need to install a suitable operating system (OS) on your development machine. From now on we'll call that development machine the host machine and the OS it runs we'll call the host platform. The choice for a suitable host platform depends on what we'll call the target platform. The target platform is the OS on which the applications you are going to develop will run on.

In simple words:

  • If you want to write programs that run on Linux then for development you'll need a computer that also runs Linux.
  • If you want to write programs that run on Windows then for development you'll need a computer that also runs Windows.
  • If you want to write programs that run on OS X then for development you'll need a computer that also runs OS X.

Now, let's say your computer already runs operating system A but you want to write programs for operating system B. If you want to stay with A you can. You don't have to wipe your harddrive. You can install B in a virtual machine. So if your computer is a Mac you can install Linux and Windows in virtual machines and you're ready to target all three platforms with a single computer.

Choosing a Suitable Compiler

Qt is a C++ framework and works with all standard compliant C++ compilers. It's up to you which one you want to use. If you don't have any special demands then do this:

  • On Linux, use the GCC compiler that comes with your Linux distribution.
  • On Windows, use Microsoft Visual Studio Compiler 2015 (MSVC 2015).
  • On OS X, use the Clang compiler provided by Apple.

GCC and Clang are free software.

MSVC is not free software. You'll need a developer license to use MSVC. Luckily it is available as a free of charge "community edition". Consult Microsoft for licensing details.

Choosing an IDE

First of all, you don't have to use an IDE (integrated development environment) at all. You can just write your software with your favorite text editor and compile your programs on the command line. Also, if you want to use an IDE, the choice which one you want to use is up to you. If you're already familiar with development on Windows then you'll probably also familiar with Microsoft Visual Studio. If you're an OS X developer then you'll most likely know Apple Xcode. Qt comes with its own IDE, Qt Creator. As you might already have guessed, Qt Creator was written specifically for software development with Qt. Thus it has all the stuff integrated you'll need: Intelligent code completion, syntax highlighting, help system, interactive GUI designers, and much more.

In simple words: Unless you know better use Qt Creator.

Choosing a Version Control System

If you're completely new to software development just skip this for now and come back to this in the future. Just for your information: Of course you can use any version control system with Qt. And of course you don't have to use one. But using a VCS should be just as normal to you as regularly making backups of your data. Qt Creator has integration for all common VCSs, e.g. Git. There are many VCSs available today with Git beeing the most advanced and most common in use. Furthermore, with services like Github or Gitlab you can collaborate with other developers online and have a backup of all your software versions "in the cloud".

In simple words: Unless you know better use Git.

Choosing a Qt Version

Here you've got three choices:

  • First choice is about the license. Qt is available as free software with most parts under the LGPL and other parts under GPL or BSD-like licenses. If you're fine with using Qt under these licensing terms then you can use the Qt Open Source Edition. If you're not fine with these terms you can buy a commercial license from The Qt Company that also comes with professional support.
  • Second choice is about the release. Qt is constantly evolving. From time to time a new version is released. As of today two "main lines" exist: The old Qt 4 series and the current Qt 5 series. Although Qt 4 is no longer officially supported, as it was a very successful product, it is still widely used in many industries. The latest iteration of the Qt 5 series is Qt 5.6. Usually you will want to use this most recent version.
  • Third choice is binary vs. source. You can get pre-compiled binaries of the Qt libraries and tools from our download page. But you can also download the sources and compile it by yourself. There are cases when you want to do the latter but in most cases you're better off using the pre-compiled libraries and tools. To make things even more complicated most Linux distributions offer their own pre-compiled versions of Qt. But these aren't always up to date.

In simple words:

  • If you want to make money with your software buy a commercial license from The Qt Company. Otherwise use the Qt Open Source Edition.
  • Unless you know better use the online installer from our download page to get the latest pre-compiled Qt release.

All Choices Made. Let's Go!

  • See the Officially Supported Platforms page to double check that your choice on a host platform and compiler is correct.
  • Install the compiler of your choice and all the other basic requirements. Check out Basic Requirements Help to see how to do this.
  • Do you want to use Git right from the start? Go to their website, read the beginners tutorial and install Git on your host machine. Also visit services like Github and Gitlab and see if you want to sign up.
  • Read the Licensing FAQ to double check that your choice on a Qt license is correct.
  • Go to our download page, download the online installer and use it to install the Qt libraries. The online installer will also install the Qt Creator IDE and all the other Qt tools you'll need. See Online Installer Help for guidance.

Deployment

Installing / Building Qt

Widgets

QtQuick

2D

Database

Guidelines

WinRT

OS X

Other