Portal:Desktop: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
m (Typo)
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{LangSwitch}}
{{LangSwitch}}
== 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.
<u>In simple words:</u>
* 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. <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 '''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.
<u>In simple words:</u> '''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. [https://git-scm.com Git]. There are many VCSs available today with Git beeing the most advanced and most common in use. Furthermore, with services like [https://github.com Github] or [https://gitlab.com Gitlab] you can collaborate with other developers online and have a backup of all your software versions "in the cloud".
<u>In simple words:</u> '''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. See the [[Main#Quick Access (Portal)|table on the main page]] for the latest, recommended iteration of the Qt 5 series. 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 [https://www.qt.io/download download page]. But you can also [http://code.qt.io/cgit/ 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.
<u>In simple words:</u>
* '''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 [https://www.qt.io/download download page] to get the latest pre-compiled Qt release.'''
=== All Choices Made. Let's Go! ===
* See the [http://doc.qt.io/qt-5/supported-platforms.html 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 [https://www.git-scm.com their website], read the beginners tutorial and install Git on your host machine. Also visit services like [https://www.github.com Github] and [https://www.gitlab.com Gitlab] and see if you want to sign up.
* Read the [http://www.qt.io/faq/ Licensing FAQ] to double check that your choice on a Qt license is correct.
* Go to our [https://www.qt.io/download 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 ==
== Deployment ==
Line 7: Line 61:
* [[Deploying_Windows_Applications]]
* [[Deploying_Windows_Applications]]
* [[Build Standalone Qt Application for Windows]]
* [[Build Standalone Qt Application for Windows]]
* [[Set-Installed-File-Permissions-for-Linux]]
* [[MesaLlvmpipe]]


== Installing / Building Qt ==
== Installing / Building Qt ==
* [[Install Qt 5 on Ubuntu]]* [[Building_Qt_for_Linux]]
* [[Install Qt 5 on Ubuntu]]
* [[Building_Qt_5_from_Git]]
* [[Building_Qt_for_Linux]]
* [[Setting-up-Qt-on-Ubuntu-in-VirtualBox]]
* [[Building_Qt_Desktop_for_Windows_with_MinGW]]
* [[Building_Qt_Desktop_for_Windows_with_MinGW]]
* [[Building Qt Desktop for Windows with MSVC]]
* [[Building Qt Desktop for Windows with MSVC]]
* [[Static_Qt_Build_for_Windows_with_GCC]]
* [[How to build a static Qt version for Windows with gcc]]
* [[Building a static Qt for Windows using MinGW]]
* [[Building a static Qt for Windows using MinGW]]
* [[Compiling-ICU-with-MSVC]]
* [[Compiling-ICU-with-MSVC]]
Line 22: Line 81:
* [[:Category:MSVC]]
* [[:Category:MSVC]]
* [[MinGW-64-bit]]
* [[MinGW-64-bit]]
* [[Haiku_installation]]


== Widgets ==
== Widgets ==
Line 32: Line 92:
* [[How to catch enter key]] (event filter)
* [[How to catch enter key]] (event filter)
* [[Progress-bar]]
* [[Progress-bar]]
* [[QSplashScreen-Replacement-for-Semitransparent-Images]]
* [[QWidget Semi-transparent Background Color]]
* [[Saving_Window_Size_State]]
* [[Remove the System Menu of a QDialog on Windows]]
* [[ShortcutOverride]]
* [[Smooth Zoom In QGraphicsView]]


== QtQuick ==
== QtQuick ==
* [[QQUIComponentsComparison]]
* [[Qt Quick Tutorial]]
* [[Qt Quick Tutorial]]
* [[JavaScript]]
* [[JavaScript]]
* [[10 secret Ninja weapons for Qt Quick QML developers]]
* [[10 secret Ninja weapons for Qt Quick QML developers]]
* [[Connect a complex signal from QML to Qt]]
* [[Connect a complex signal from QML to Qt]]
* [[Creating-a-property-binding-from-JavaScript]]
* [[Drag and Drop within a GridView]]
* [[Drag and Drop within a GridView]]
* [[How to Bind a QML Property to a C++ Function]]
* [[How to Bind a QML Property to a C++ Function]]
Line 46: Line 112:
* [[Performance tip Images]]
* [[Performance tip Images]]
* [[Performance tip QML other]]
* [[Performance tip QML other]]
* [[Performance tip Use Loaders]]
* [[Property-var]]
* [[QML-Containers]]
* [[QML-States-Controlling]]
* [[QML-Dynamic-Objects]]
* [[QML Example Use timer to update Date]]
* [[QmlStyling]]
* [[QML-Application-Structuring-Approaches]]
* [[QML_Multi-line_Texts_Handling]]
* [[QtQuick_ToolTip_Component]]


== 2D ==
== 2D ==
Line 52: Line 128:


== Database ==
== Database ==
* [[Building the MySQL Plugin]]
* [[General Database Connection Dialog]]
* [[How to Store and Retrieve Image on SQLite]]
* [[How to Store and Retrieve Image on SQLite]]
* [[How to Use a QSqlQueryModel in QML]]
* [[How to Use a QSqlQueryModel in QML]]
Line 66: Line 140:
* [[Coding Conventions]]
* [[Coding Conventions]]
* [[Memory-management]]
* [[Memory-management]]
* [[Qt Coding Style]]
* [[Writing good tests]]
== WinRT ==
* [[WinRT]]
* [[WinRTBuild]]
* [[WinRT TP1 deployment]]
== OS X ==
* [[How to use OS X Notification Center]]


== Other ==
== Other ==
Line 73: Line 157:
* [[How to Use Signals and Slots]] / [[New Signal Slot Syntax]] (Qt 5)
* [[How to Use Signals and Slots]] / [[New Signal Slot Syntax]] (Qt 5)
* [[Basic Qt Programming Tutorial]]
* [[Basic Qt Programming Tutorial]]
* [[Basics Of Plugins]]
* [[Basics Of Plugins]] / [[Plugins]]
* [[Call an AppleScript from Qt]]
* [[Call an AppleScript from Qt]]
* [[Automating generation of qm files]]
* [[Automating generation of qm files]]
Line 81: Line 165:
* [[Handling CSV]]
* [[Handling CSV]]
* [[Handling Microsoft Excel file format]]
* [[Handling Microsoft Excel file format]]
* [[Handling OpenDocument Spreadsheet]]
* [[How to Use QSettings]]
* [[How to Use QSettings]]
* [[How to create a library with Qt and use it in an application]]
* [[How to create a library with Qt and use it in an application]]
Line 89: Line 172:
* [[Locales]]
* [[Locales]]
* [[Porting from GTK]]
* [[Porting from GTK]]
* [[Iterators]]
* [[Iterators]] / [[Performance Tip Optimizing Iteration]]
* [[Learning Cpp With Qt]]
* [[QFlags_tutorial]]
* [[Mixing C and ObjectiveC Code]]
* [[QVariant_Internals]]
* [[QThreads general usage]]
* [[Set Thread Priority In QtConcurrent]]
* [[Threads Events QObjects]]
* [[Qt Multimedia Backends]]
* [[Qt5GraphicsOverview]]
* [[Qt Serial Port]]
* [[QtConcurrent-simple-usage]]
* [[QtInternationalization]]
* [[Qt thread-safe singleton]]

Latest revision as of 11:23, 11 November 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. See the table on the main page for the latest, recommended iteration of the Qt 5 series. 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