Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
Qt Creator: Difference between revisions
No edit summary |
(Informed about the https protocol and direct download to commit-msg hook) |
||
(12 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{LangSwitch}} | |||
[[Category:Tools::QtCreator]] | |||
Qt Creator is a cross-platform IDE (integrated development environment) tailored to the needs of Qt developers. | |||
It is part of the [http://www.qt.io Qt Project]. | |||
==Advanced code editor== | |||
Qt Creator focuses on providing features that help new Qt users get up and running faster, | |||
and also boost the productivity of experienced Qt developers. | |||
*Code editor with C++, QML and ECMAscript support | |||
*Rapid code navigation tools | |||
*Syntax highlighting and code completion | |||
*Static code checking and style hints as you type | |||
*Support for source code refactoring | |||
*Context sensitive help | |||
*Code folding | |||
*Parenthesis matching and parenthesis selection modes | |||
==Visual debugger== | |||
The visual debugger for C++ is aware of the structure of many Qt classes, thus increasing its ability to display Qt’s data clearly. | |||
In addition, Qt Creator displays the raw information from GDB in a clear and concise manner. | |||
*Interrupt program execution. | |||
*Step through the program line-by-line or instruction-by-instruction. | |||
*Set breakpoints. | |||
*Examine call stack contents, watchers, and local and global variables. | |||
==GUI designers== | |||
Integrated GUI layout and forms builder for C++ projects, which allows you to rapidly design and build widgets and dialogs using on-screen forms using the same widgets that will be used in your application. Forms are fully-functional, and they can be previewed immediately to ensure that they will look and feel exactly as you intended. | |||
==Installing Qt Creator== | |||
If you are interested in using Qt Creator for development, check our [http://qt.io/download#qt-creator download page] or look for [[VendorPackages|Vendor Packages]]. | |||
If you want to check out the latest features, we provide nightly updated [http://download.qt.io/snapshots/qtcreator/ binary snapshot builds]. See the [https://github.com/qt-creator/qt-creator#compiling-qt-creator README.md] file in the sources for further information on how to build Qt Creator. | |||
If you want to participate in the development of Qt Creator, see the section on contributing to Qt Creator below. | |||
==Contributing to Qt Creator== | |||
We mostly follow the process and guidelines used for Qt itself that you can find in the [[:Category:Developing_Qt::Guidelines]]. Please find detailed information about the process there. There is also a work-in-progress draft on [https://doc.qt.io/qtcreator-extending/ Extending Qt Creator]. Apart from contributing code, you can also help us by testing Qt Creator on the platform of your choice, see [[:Category:Tools::QtCreator::QualityAssurance|Qt Creator Quality Assurance]]. If you have questions, don’t hesitate to contact us e.g. at the [irc://irc.libera.chat/#qt-creator #qt-creator] IRC channel on Libera.Chat or on [http://lists.qt-project.org/mailman/listinfo/qt-creator our mailing list]. (For a full list of IRC channels see [[OnlineCommunities]].) | |||
===Setting up a Qt Creator development environment=== | |||
*Make sure you have a supported Qt version available on your machine. | |||
*Clone the code from one of the "Clone" urls found on http://code.qt.io/cgit/qt-creator/qt-creator.git/ running. Run <code>"git clone <URL>"</code> to do that. | |||
*Copy a git hook from our gerrit server. To do so switch into the directory you checked out just now and run <code>"scp -P 29418 -p codereview.qt-project.org:hooks/commit-msg .git/hooks"</code> there. This hook will add Change IDs that are needed by gerrit to all commit messages you write going forward | |||
*If the <code>scp</code> command doesn't work for you, you can download the [http://codereview.qt-project.org/tools/hooks/commit-msg commit-msg] file and copy it manually to the Qt Creator's <code>.git/hooks</code> directory. | |||
===Setting up Gerrit to contribute back to Qt Creator=== | |||
These steps are only necessary if you do not already have gerrit set up for contributions to Qt or other projects listed on http://code.qt.io/cgit. | |||
*Create a new account on https://bugreports.qt.io/ (if you do not have one already) | |||
*Log into https://codereview.qt-project.org/ with that account. It works for both codereview.qt-project.org as well as bugreports.qt.io. | |||
*Follow the setup steps given there: | |||
**Provide a Full Name | |||
**Provide an email address where you can be reached. This address needs to match the one you use in your git commit messages. | |||
**Paste your ''public'' SSH key into the text field and press "Add" | |||
**Follow the "New Contributor Agreement" link at the bottom of the page. | |||
*Agree to the contributor agreement (Individual contributor) or have somebody in your company register a company wide CLA with our Gerrit and get your user added to that CLA. | |||
Now gerrit should be functional for you. | |||
===Setting up git to use Gerrit=== | |||
Gerrit is the software running on https://codereview.qt-project.org/ that we use to discuss and review all patches going into Qt Creator. | |||
This assumes you have set up your git clone according to ''"Setting up a Qt Creator development environment"'' above. | |||
*Make the gerrit server known to your git repository: Go into the directory you did check out and run <code>git remote add gerrit "<nowiki>ssh://USERNAME@codereview.qt-project.org:29418/qt-creator/qt-creator</nowiki>"</code>, using your gerrit account name in place of USERNAME. | |||
*Alternatively you can use the https protocol with <code>git remote add gerrit "<nowiki>https://USERNAME@codereview.qt-project.org/a/qt-creator/qt-creator</nowiki>"</code>with the https password obtained from https://codereview.qt-project.org/settings/#HTTPCredentials | |||
*Fetch the changes from gerrit: <code>"git fetch gerrit"</code> | |||
Now you should be able to push all of your changes to Gerrit by simply doing <code>"git push gerrit HEAD:refs/for/master"</code> (or <code>refs/for/BRANCHNAME</code> if you do want to sent them to other branches). Please set up reviewers using the gerrit web UI to all patches. Without reviewers you will see a long delay before your patches get reviewed (if they do not fall through the cracks completely!). "git blame <FILENAME>" on the files you touched usually is a good way to find possible reviewers. Adding the responsible maintainer according to [[:Maintainers]] is also a good idea. | |||
If you are considering to send several patches, please consider to clone http://code.qt.io/cgit/qt/qtrepotools.git/ and add the "bin" directory in that repository to your PATH. This will enable some new commands for git. These include <code>"git gpush"</code> that helps with pushing to gerrit and using that is highly recommended. Please also check the comment in <code>git-hooks/git_post_commit_hook</code> found in that repository to enable the sanity checks gerrit runs on local commits. | |||
==Questions and Feedback== | |||
If you have any problems, please look through our [http://doc.qt.io/qtcreator/creator-faq.html Frequently Asked Questions] first. If your problems persist, scan the [http://lists.qt-project.org/mailman/listinfo/qt-creator Qt Creator mailing list] archive. If that doesn’t help, have a look at our [https://bugreports.qt.io/browse/QTCREATORBUG Bug Tracker] to check if it is a known problem, or to create a bug report. Finally, you can ask on the Qt Creator mailing list (you need to subscribe first). You can also try to ask questions at the [https://web.libera.chat/#qt-creator #qt-creator] IRC channel on [https://libera.chat Libera.Chat] where you will find both Qt Creator developers and Qt Creator users. | |||
===Links=== | |||
*[http://qt.io/download Download] | |||
*[http://www.qt.io Qt Project page] | |||
*[https://bugreports.qt.io/browse/QTCREATORBUG Bugtracker] | |||
*[http://code.qt.io/cgit/qt-creator Code.qt.io page] | |||
*[http://codereview.qt.io Code review tool] | |||
*[http://blog.qt.io Qt Labs blog posts] | |||
*[http://forum.qt.io Forum page on Qt Developer network] | |||
===External Links=== | |||
[http://psconboard.blogspot.com/2011/07/autotools-project-manager-part-1.html Autotools Project Manager, part 1: Understanding QtCreator's Project Explorer] | |||
[http://processors.wiki.ti.com/index.php/Qt_Creator_Embedded_Debugging_Setup Qt Creator Embedded Debugging Setup] |
Latest revision as of 14:45, 2 June 2022
Qt Creator is a cross-platform IDE (integrated development environment) tailored to the needs of Qt developers. It is part of the Qt Project.
Advanced code editor
Qt Creator focuses on providing features that help new Qt users get up and running faster, and also boost the productivity of experienced Qt developers.
- Code editor with C++, QML and ECMAscript support
- Rapid code navigation tools
- Syntax highlighting and code completion
- Static code checking and style hints as you type
- Support for source code refactoring
- Context sensitive help
- Code folding
- Parenthesis matching and parenthesis selection modes
Visual debugger
The visual debugger for C++ is aware of the structure of many Qt classes, thus increasing its ability to display Qt’s data clearly. In addition, Qt Creator displays the raw information from GDB in a clear and concise manner.
- Interrupt program execution.
- Step through the program line-by-line or instruction-by-instruction.
- Set breakpoints.
- Examine call stack contents, watchers, and local and global variables.
GUI designers
Integrated GUI layout and forms builder for C++ projects, which allows you to rapidly design and build widgets and dialogs using on-screen forms using the same widgets that will be used in your application. Forms are fully-functional, and they can be previewed immediately to ensure that they will look and feel exactly as you intended.
Installing Qt Creator
If you are interested in using Qt Creator for development, check our download page or look for Vendor Packages.
If you want to check out the latest features, we provide nightly updated binary snapshot builds. See the README.md file in the sources for further information on how to build Qt Creator.
If you want to participate in the development of Qt Creator, see the section on contributing to Qt Creator below.
Contributing to Qt Creator
We mostly follow the process and guidelines used for Qt itself that you can find in the Category:Developing_Qt::Guidelines. Please find detailed information about the process there. There is also a work-in-progress draft on Extending Qt Creator. Apart from contributing code, you can also help us by testing Qt Creator on the platform of your choice, see Qt Creator Quality Assurance. If you have questions, don’t hesitate to contact us e.g. at the #qt-creator IRC channel on Libera.Chat or on our mailing list. (For a full list of IRC channels see OnlineCommunities.)
Setting up a Qt Creator development environment
- Make sure you have a supported Qt version available on your machine.
- Clone the code from one of the "Clone" urls found on http://code.qt.io/cgit/qt-creator/qt-creator.git/ running. Run to do that.
"git clone <URL>"
- Copy a git hook from our gerrit server. To do so switch into the directory you checked out just now and run there. This hook will add Change IDs that are needed by gerrit to all commit messages you write going forward
"scp -P 29418 -p codereview.qt-project.org:hooks/commit-msg .git/hooks"
- If the command doesn't work for you, you can download the commit-msg file and copy it manually to the Qt Creator's
scp
directory..git/hooks
Setting up Gerrit to contribute back to Qt Creator
These steps are only necessary if you do not already have gerrit set up for contributions to Qt or other projects listed on http://code.qt.io/cgit.
- Create a new account on https://bugreports.qt.io/ (if you do not have one already)
- Log into https://codereview.qt-project.org/ with that account. It works for both codereview.qt-project.org as well as bugreports.qt.io.
- Follow the setup steps given there:
- Provide a Full Name
- Provide an email address where you can be reached. This address needs to match the one you use in your git commit messages.
- Paste your public SSH key into the text field and press "Add"
- Follow the "New Contributor Agreement" link at the bottom of the page.
- Agree to the contributor agreement (Individual contributor) or have somebody in your company register a company wide CLA with our Gerrit and get your user added to that CLA.
Now gerrit should be functional for you.
Setting up git to use Gerrit
Gerrit is the software running on https://codereview.qt-project.org/ that we use to discuss and review all patches going into Qt Creator.
This assumes you have set up your git clone according to "Setting up a Qt Creator development environment" above.
- Make the gerrit server known to your git repository: Go into the directory you did check out and run , using your gerrit account name in place of USERNAME.
git remote add gerrit "<nowiki>ssh://USERNAME@codereview.qt-project.org:29418/qt-creator/qt-creator</nowiki>"
- Alternatively you can use the https protocol with with the https password obtained from https://codereview.qt-project.org/settings/#HTTPCredentials
git remote add gerrit "<nowiki>https://USERNAME@codereview.qt-project.org/a/qt-creator/qt-creator</nowiki>"
- Fetch the changes from gerrit:
"git fetch gerrit"
Now you should be able to push all of your changes to Gerrit by simply doing
"git push gerrit HEAD:refs/for/master"
(or
refs/for/BRANCHNAME
if you do want to sent them to other branches). Please set up reviewers using the gerrit web UI to all patches. Without reviewers you will see a long delay before your patches get reviewed (if they do not fall through the cracks completely!). "git blame <FILENAME>" on the files you touched usually is a good way to find possible reviewers. Adding the responsible maintainer according to Maintainers is also a good idea. If you are considering to send several patches, please consider to clone http://code.qt.io/cgit/qt/qtrepotools.git/ and add the "bin" directory in that repository to your PATH. This will enable some new commands for git. These include
"git gpush"
that helps with pushing to gerrit and using that is highly recommended. Please also check the comment in
git-hooks/git_post_commit_hook
found in that repository to enable the sanity checks gerrit runs on local commits.
Questions and Feedback
If you have any problems, please look through our Frequently Asked Questions first. If your problems persist, scan the Qt Creator mailing list archive. If that doesn’t help, have a look at our Bug Tracker to check if it is a known problem, or to create a bug report. Finally, you can ask on the Qt Creator mailing list (you need to subscribe first). You can also try to ask questions at the #qt-creator IRC channel on Libera.Chat where you will find both Qt Creator developers and Qt Creator users.
Links
- Download
- Qt Project page
- Bugtracker
- Code.qt.io page
- Code review tool
- Qt Labs blog posts
- Forum page on Qt Developer network
External Links
Autotools Project Manager, part 1: Understanding QtCreator's Project Explorer