- Offline Qt Downloads
- Qt6 Source Packages
- Qt 6.2.0 Source Packages:
- Older Qt Versions
- Qt 5.15.x Source Packages
- 5.12.x Offline Installers
- Qt Creator
- Pre-releases
- Qt Documentation
- Contents
- Supported Configurations
- Requirements for Development Host
- Debian/Ubuntu (apt-get)
- Fedora/RHEL/CentOS (yum)
- openSUSE (zypper)
- Building Qt 5 from Source
- Deployment and Other Issues
- Where to Go from Here
- Qt Documentation
- Contents
- Supported Configurations
- Requirements for Development Host
- Debian/Ubuntu (apt-get)
- Fedora/RHEL/CentOS (yum)
- openSUSE (zypper)
- Building Qt from Source
- Deployment and Other Issues
- Where to Go from Here
- Qt Creator — A Cross-platform IDE for Application Development
- Установка и настройка Qt Creator
- Что такое Qt Creator
- Установка Qt Creator
- Настройка Qt Creator
- Установка компонентов Qt Creator
- Работа с Qt Creator — первый проект
- Выводы
Offline Qt Downloads
We recommend you use the Qt Online Installer for first time installations and the Qt Maintenance Tool for changes to a current install.
- Qt6 source packages
- 5.15.x source packages
- 5.12.x Offline Installers
- Qt Creator
- Other downloads
- Pre-releases
Qt6 Source Packages
Qt 6.2.0 Source Packages:
The source code is available:
- For Windows users as a single zip file (1.0 G) ( Info )
- For Linux/macOS users as a tar.xz file (636 MB) ( Info )
You can get split source packages from here. Or visit the repository at code.qt.io.
Older Qt Versions
All older versions of Qt are available in the archive .
Qt 5.15.x Source Packages
The source code is available:
- For Windows users as a single zip file (962 MB) ( Info )
- For Linux/macOS users as a tar.xz file (560 MB) ( Info )
You can get split source packages from here. Or visit the repository at code.qt.io.
5.12.x Offline Installers
Qt offline installer is a stand-alone binary package including Qt libraries and Qt Creator.
Source packages & Other releases
The source code is available:
- For Windows users as a single zip file (831 MB) ( Info )
- For Linux/macOS users as a tar.xz file (486 MB) ( Info )
You can get split source packages from here. Or visit the repository at code.qt.io.
Qt Creator
Qt Creator 5.0.2 is released and it is available via Qt online installer. If you need a standalone installer, please select the file according to your operating system from the list below to get the latest Qt Creator for your computer.
The source code is available as a zip (69 MB) ( Info ) or a tar.gz (55 MB) ( Info ). Or visit the repository at code.qt.io.
Be sure to check if Qt is supported on your platform and read the installation notes that are located in the Qt Documentation .
Please check the individual downloads for licensing information.
Pre-releases
Looking for Qt 6.2.0 RC? Source packages are here.
Источник
Qt Documentation
Contents
Qt’s support for different Linux platforms is extensive and mature.
To download and install Qt for Linux, follow the instructions on the Getting Started with Qt page.
Supported Configurations
The following configurations are supported.
Distribution | Architecture | Compiler | Notes |
---|---|---|---|
openSUSE 15.1 | x86_64 | GCC 5 or later, GCC 7, ICC 19.1 | |
SUSE Linux Enterprise Server | x86_64 | GCC 5 or later, GCC 10 | |
Red Hat Enterprise Linux 7.6 | x86_64 | GCC 5.3.1 via devtoolset-4 | |
Ubuntu 18.04 | x86_64 | GCC 5 or later, GCC 9 | |
Generic Linux | x86 and x86_64 | GCC (5 or later), ICC 18.x |
Requirements for Development Host
The Qt installers for Linux assume that a C++ compiler, debugger, make, and other development tools are provided by the host operating system. In addition, building graphical Qt applications requires OpenGL libraries and headers installed. Most Linux distributions do not install all of these by default, but setting up a development environment is still straightforward.
Use the following commands to install the basic requirements for building Qt applications:
Debian/Ubuntu (apt-get)
Fedora/RHEL/CentOS (yum)
openSUSE (zypper)
Building Qt 5 from Source
You can also build Qt 5 from the source package and configure it according to your target platform. The source packages are obtained from http://www.qt.io/download/.
Below, you will find more information about building Qt from source.
Deployment and Other Issues
The pages below covers specific issues and recommendations for creating Linux/X11 applications.
Where to Go from Here
We invite you to explore the rest of Qt. We prepared overviews which help you decide which APIs to use and our examples demonstrate how to use our API.
- Qt Overviews — list of topics about application development
- Examples and Tutorials — code samples and tutorials
- Qt Reference Pages — a listing of C++ and QML APIs
- Qt X11 Extras — provides additional APIs for X11
Qt’s vibrant and active community site, http://qt.io houses a wiki, a forum, and additional learning guides and presentations.
В© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.
Источник
Qt Documentation
Contents
Qt’s support for different Linux platforms is extensive and mature.
To download and install Qt for Linux, follow the instructions on the Getting Started with Qt page.
Supported Configurations
The following configurations are supported.
Distribution | Architecture | Compiler | Notes |
---|---|---|---|
CentOS Linux 8.1 | x86_64 | GCC 9 | |
openSUSE 15.2 | x86_64 | GCC 9 | |
SUSE Linux Enterprise Server 15 SP2 | x86_64 | GCC 10 | |
Ubuntu 20.04 | x86_64 | GCC as provided by Canonical, GCC 9.x | |
Generic Linux | x86 and x86_64 | GCC 9 |
Requirements for Development Host
The Qt installers for Linux assume that a C++ compiler, debugger, make, and other development tools are provided by the host operating system. In addition, building graphical Qt applications requires OpenGL libraries and headers installed. Most Linux distributions do not install all of these by default, but setting up a development environment is still straightforward.
Use the following commands to install the basic requirements for building Qt applications:
Debian/Ubuntu (apt-get)
Fedora/RHEL/CentOS (yum)
openSUSE (zypper)
Building Qt from Source
You can also build Qt from the source package and configure it according to your target platform. The source packages are obtained from http://www.qt.io/download/.
Below, you will find more information about building Qt from source.
Deployment and Other Issues
The pages below covers specific issues and recommendations for creating Linux/X11 applications.
Where to Go from Here
We invite you to explore the rest of Qt. We prepared overviews which help you decide which APIs to use and our examples demonstrate how to use our API.
- Qt Overviews — list of topics about application development
- Examples and Tutorials — code samples and tutorials
- Qt Reference Pages — a listing of C++ and QML APIs
Qt’s vibrant and active community site, http://qt.io houses a wiki, a forum, and additional learning guides and presentations.
В© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.
Источник
Qt Creator — A Cross-platform IDE for Application Development
Qt Creator is a cross-platform integrated development environment (IDE) built for the maximum developer experience. Qt Creator runs on Windows, Linux, and macOS desktop operating systems, and allows developers to create applications across desktop, mobile, and embedded platforms.
SOPHISTICATED CODE EDITOR
Qt Creator’s advanced code editor lets you code in C++, QML, JavaScript, Python and other languages. It features code completion, syntax highlighting, refactoring and has built-in documentation at your fingertips.
VERSION CONTROL
Qt Creator integrates with most popular version control systems, including Git, Subversion, Perforce, and Mercurial.
INTEGRATED UI DESIGN
Integrated visual editors for building C++ widget-based applications or fluid Qt Quick-based animated UIs with ready-made controls.
PROJECT & BUILD MANAGEMENT
Import an existing project or create one from scratch – Qt Creator generates all the necessary files. Support for Cmake and cross-compiling with qmake is included.
MULTIPLE TARGETS
Build for and run your software on desktop, mobile and embedded operating systems. The build settings allow you to easily switch between targets.
Qt DEVICE EMULATOR
Test and debug applications in conditions practically identical to those on your target device.
Qt QUICK COMPILER
Compile source code into native machine code, accelerate start-up time and UI performance, and protect your source code and intellectual property.
Источник
Установка и настройка Qt Creator
С каждым годом становится все больше операционных систем, и потому разработчикам все труднее удовлетворять потребности пользователей. Три самые популярные компьютерные платформы — Windows, Linux и Mac OS, а также три мобильные — Android, iOS и Windows Mobile — продолжают активно бороться между собой. А это значит, что качественное приложение должно работать на всех основных платформах.
Справиться с этой проблемой помогает кроссплатформенная разработка. Об одной из самых популярных кроссплатформенных сред разработки — Qt Creator — и пойдёт речь в этой статье. Мы рассмотрим как выполняется установка и настройка Qt Creator, а также как работать в Qt Creator.
Что такое Qt Creator
Qt Creator (не так давно имевший название Greenhouse) — это одна из самых распространенных кроссплатформенных IDE. Ее плюсы — удобство, быстрота работы, а также — свободность, так как это ПО с открытым исходным кодом. Поддерживаются такие языки, как C, С++, QML.
Программа была написана компанией под названием Trolltech, которая в полной мере выполнила цель создания среды — работу с графическим фреймворком Qt. Удобный графический интерфейс с поддержкой Qt Widgets и QML, а также большое число поддерживаемых компиляторов позволяют быстро и удобно создать свое кроссплатформенное приложение.
Главная задача этой IDE — обеспечить наиболее быструю кроссплатформенную разработку, используя собственный фреймворк. Благодаря этому разработчики получают прекрасную возможность не писать приложения нативно (т. е. отдельно под каждую платформу), а создать общий код, и, возможно, подогнать его под особенности используемых ОС.
Qt Creator также включает в себя утилиту Qt Designer, что позволяет обработать внешний вид окна приложения, добавляя и перетаскивая элементы (аналогично Windows Forms в Visual Studio). В качестве систем сборки используются qmake, cmake и autotools.
Установка Qt Creator
Итак, пора рассмотреть как установить Qt Creator. Если для Windows разработчики позаботились и сделали оффлайн-установщик, то в Linux 32-bit этой возможности не предусмотрено. Поэтому во время установки вам может потребоваться стабильное интернет-соединение (
20-30 минут). Для начала скачаем установщик:
После окончания загрузки переходим в папку с файлом, нажимаем правой кнопкой мыши и выбираем пункт «Свойства».
Теперь перейдем на вкладку «Права» и поставим галочку «Разрешить запуск этого файла в качестве программы».
Теперь нажимаем «Next».
Здесь необходимо выбрать существующий аккаунт или создать его. Данное действие необходимо для проверки лицензии (коммерческой или некоммерческой).
Нажимаем «Next».
Выбираем директорию, в которой будет находиться Qt. Важно, чтобы в пути не было кириллицы и пробелов!
В этом меню находится выбор компонентов. К примеру, можно выбрать установку инструментов для разработки на Android, или же исходных компонентов (это нужно для статической сборки, если кому-то это нужно — напишите в комментариях, и я напишу отдельную статью). Если Вы не уверены, нужны Вам эти компоненты или нет, оставьте их пока так — даже после установки Qt будет возможным удаление и добавление элементов.
В этом окне принимаем лицензию. Жмем «Next».
Если Вы готовы, начинайте установку. У Вас запросят пароль суперпользователя (sudo), после чего начнется скачивание и извлечение файлов. Альтернативный способ — установка через терминал. Для начала необходимо обновить список пакетов.
sudo apt update
Скачиваем и устанавливаем Qt:
sudo apt install qt5-default
Теперь установка Qt Creator:
sudo apt install qtcreator
И, если нужно, исходники.
sudo apt install qtbase5-examples qtdeclarative5-examples
Настройка Qt Creator
После окончания установки перезагрузите компьютер и запустите Qt Creator. Перейдите в меню «Инструменты» -> «Параметры».
Здесь следует рассмотреть несколько вкладок.
1. Среда — это настройка внешнего вида самой IDE, а также изменение сочетаний клавиш и управление внешними утилитами.
2. Текстовый редактор — здесь идет настройка внешнего вида, шрифтов и расцветки редактора.
3. C++ — подсветка синтаксиса, работа с расширениями файлов и UI (т. е. формами).
4. Android — здесь собраны пути к необходимым инструментам, а также в этом меню настраиваются подключаемые или виртуальные устройства.
Установка компонентов Qt Creator
Если вдруг так случилось, что Вы забыли установить какой-то компонент, или, наоборот, хотите его удалить, то на помощь придет Qt Maintenance Tool. Это инструмент, позволяющий управлять всеми компонентами Qt Creator.
Чтобы запустить его, перейдите в меню приложений, выберите пункт «Разработка» -> «Qt Maintenance Tool».
Выберите необходимый пункт (Удалить/добавить компоненты, обновить компоненты или удалить Qt). После выполните необходимые операции и закройте окно.
Работа с Qt Creator — первый проект
Ну что же, час пробил! Установка Qt Creator завершена. Пора сделать свое первое кроссплатформенное приложение на Linux, а затем скомпилировать его на Windows. Пусть это будет. программа, выводящая иконку Qt, кнопку и надпись, на которую по нажатию кнопки будет выводиться случайная фраза. Проект несложный, и, конечно же, кроссплатформенный!
Для начала откроем среду разработки. Нажмем «Файл» -> «Создать файл или проект. «. Выберем приложение Qt Widgets — его быстро и удобно сделать. А название ему — «Cross-Platphorm». Вот как!
Комплект — по умолчанию. Главное окно тоже оставляем без изменений. Создаем проект.
Для начала необходимо настроить форму — главное окно приложения. По умолчанию оно пустое, но это не останется надолго.
Перейдем в папку «Формы» -> «mainwindow.ui». Откроется окно Qt Designer:
Удаляем панель меню и панель инструментов на форму, нажав правой кнопкой мыши и выбрав соответствующий пункт. Теперь перетаскиваем элементы Graphics View, Push Button и Label таким образом:
Чтобы изменить текст, дважды кликните по элементу. В свойствах Label (справа) выбираем расположение текста по вертикали и по горизонтали — вертикальное.
Теперь пора разобраться с выводом иконки. Перейдем в редактор, слева кликнем по любой папке правой кнопкой мыши и выберем «Добавить новый. «. Теперь нажимаем «Qt» -> «Qt Resource File». Имя — res. В открывшемся окне нажимаем «Добавить» -> «Добавить префикс», а после добавления — «Добавить файлы». Выбираем файл, а в появившемся окне «Неверное размещение файла» кликаем «Копировать».
Получилось! Сохраняем все. Снова открываем форму. Кликаем правой кнопкой мыши по Graphics View, выбираем «styleSheet. » -> «Добавить ресурс» -> «background-image». В левой части появившегося окна выбираем prefix1, а в правой — нашу картинку. Нажимаем «ОК». Настраиваем длину и ширину.
Все! Теперь можно приступать к коду. Клик правой кнопкой мыши по кнопке открывает контекстное меню, теперь надо нажать «Перейти к слоту. » -> «clicked()». В окне набираем следующий код:
Или вы можете скачать полный проект на GitHub. Работа с Qt Creator завершена, нажимаем на значок зеленой стрелки слева, и ждем запуска программы (если стрелка серая, сначала нажмите на значок молотка). Запустилось! Ура!
Выводы
Установка и настройка Qt Creator завершена. Теперь вы сможете создавать свои программы под огромное число платформ, оставляя код нетронутым! Кстати, установив Qt на Windows, вы сможете скомпилировать этот проект и там. Удачи вам!
Источник