Questions tagged [qt]

Qt is a cross-platform application development framework widely used for the development of application software that can be run on various software and hardware platforms with little or no change in the underlying codebase, while having the power and speed of native applications. Qt is available with both commercial and open source licenses.

General information

Official logo

Qt logo

About

Qt (pronounced officially as cute (/'kjuːt/) though commonly pronounced as Q.T. (/ˈkjuː.tiː/)) is a cross-platform application development framework widely used for the development of GUI programs (where it functions like a cross-platform widget toolkit), and also used for developing non-GUI programs such as console tools and servers. wikipedia

Qt was created by Trolltech, and was acquired by Nokia in 2008. One month after the end of symbian development at Nokia, Nokia decided to sell Qt. From September 2012 and until now Qt is managed by the Qt Company which is subsidiary of Digia.

License

Qt is available under four different licenses:

  1. GNU General Public License (GPL) version 3.0
  2. GNU Lesser General Public License (LGPL) version 2.1
  3. GNU Lesser General Public License (LGPL) version 3.0
  4. Qt Commercial License (which comes in three versions with different features and prices: "Indie Mobile", "Professional" and "Enterprise")

Current version

The latest official release is 5.14. The major version indicates API and binary compatibility.

Recommendations

Tagging

You will often see questions tagged specifically as , , or to indicate that the question is related to Qt 3.x, 4.x, 5.x or 6.x respectively. Qt 3.x is no longer supported, and Qt 6 is still in beta. The latest released major version is still Qt 5.x so, when not specifically mentioned, version 5.x of the API should be assumed.

Spelling

The correct spelling is Qt, not to be confused with QT, which stands for QuickTime - an extensible multimedia framework developed by Apple Inc.

Reminder

Please, do not answer poor questions that will likely get closed or even deleted later. We are aiming for high-quality in this tag, thus we do not wish to encourage poor questions by feeding them with answers.

Resources

Documentation

There is an extensive official documentation (all classes) available on Qt's website, in addition to tutorials and examples. You will often see these tutorials and examples referenced in the questions and answers on this site. Qt also provides an integrated development environment, IDE, named Qt Creator. Although it mainly aims at creating Qt applications, it can be used to create regular C++ applications as well.

Video courses

Pluralsight has a series of three courses on Qt:

  1. Introduction to Qt: A C++ Cross Platform Application Framework
  2. Qt Quick Fundamentals
  3. Integrating Qt Quick and C++

Pluralsight is a subscription based but if you're only interested in Qt you can send the author @todgentille a private tweet and request a week long VIP pass. You'll get unlimited access to the higher subscription level for a week that allows viewing online and offline and you can download the course materials.

Packtpub also has a video tutorial based on Qt 5.

Voidrealm released a full free series of Qt tutorials for beginners on his youtube channel.

Books

Qt introductory books:

Integrated learning of Qt and C++:

Concepts of UI design:

Please, check out the official Qt documentation for more details of recommended books about Qt programming.

79389 questions
13
votes
1 answer

How to connect Python and QML with PySide2?

I want to write a simple desktop application on Ubuntu and I thought that an easy way was to use Qt with QML as GUI and Python as the language for the logic, since I am somewhat familiar with Python. Now I am trying for hours to somehow connect the…
Fabian
  • 479
  • 1
  • 4
  • 15
13
votes
1 answer

C++0x with Qt Creator

I'm trying to use new C++0x features in Qt Creator under Windows (Qt Creator 2.0.1). I read the thread Configuring the GCC compiler switches in Qt, Qt Creator, and QMake and added QMAKE_CXXFLAGS += -std=c++0x to .pro file. After it Qt Creator gives…
UmmaGumma
  • 5,633
  • 1
  • 28
  • 45
13
votes
1 answer

Right click contextMenu on QPushButton

For my app I have created a GUI in Qt Designer and converted it into python(2.6) code. On some of the QPushButton (created with the designer) I want to add a right click context menu. The menu options depend on the application status. How to…
ArtDijk
  • 1,487
  • 5
  • 19
  • 27
13
votes
6 answers

Is there a better way to wordwrap text in QToolTip than just using RegExp?

So the question is in the title. QToolTip doesn't seem to provide the wordwraop feature. It is possible, however, to replace the Nth space with an \n using regexps, but I was wondering if anyone has a suggestion for a better sollution.…
ravil
  • 547
  • 1
  • 4
  • 18
13
votes
4 answers

Windows Console and Qt Unicode Text

I spent a whole day trying to figure this out with no luck. I looked Everywhere but no luck with working code. OS: Win XP Sp2 IDE & FRAMEWORK: C++, Qt Creator 2.0. I am trying to output some unicode (UTF-8) text to the windows console but all I see…
user440297
  • 1,176
  • 1
  • 21
  • 31
13
votes
1 answer

What is implicit sharing?

I am building a game engine library in C++. A little while back I was using Qt to build an application and was rather fascinated with its use of Implicit Sharing. I am wondering if anybody could explain this technique in greater detail or could…
Dave
  • 6,313
  • 11
  • 49
  • 95
13
votes
1 answer

How to use native android webview in Qt C++ using QAndroidJniObject

I would like to use the Android WebView in my qml application. The default WebView object provided uses native rendering but several features are missing (for example the ability to intercept network requests and block them). I know that Qt allows…
daljit97
  • 578
  • 10
  • 31
13
votes
3 answers

Distinguish between single and double click events in Qt

I have a QAbstractItemView that needs to react to single and double click events. The actions are different depending on whether it was single clicked or double clicked. The problem that is occurring is that the single click event is received prior…
Jesse Vogt
  • 14,831
  • 14
  • 55
  • 71
13
votes
7 answers

Valid methods in being highlighted in red 'Unresolved Reference'

How to solve this problem? The program works. But the methods in Gogland are highlighted in red. Qt version 5.8 is added. Gogland (1.0 Preview) 1.0 EAP Build #GO-171.4694.61, built on June 27, 2017 Gogland EAP User Expiration date: September 25,…
Sergey Andrianov
  • 398
  • 3
  • 13
13
votes
3 answers

Manipulate data in a QAbstractListModel from a QML ListView

I have a QML ListView which uses a QAbstractListModel subclass as a model. ListView { id: myListView x: 208 y: 19 width: 110 height: 160 delegate: myListDelegate {} model: MyListModel opacity: 0 } The model is a list…
13
votes
1 answer

How to use Qt library with VisualStudio 2017?

At the official Qt library site present only Qt add-in for Microsoft Visual Studio 2013 and 2015. And there are no one for MSVS 2017. How to use Qt library with visual studio 2017 in this case?
AeroSun
  • 2,077
  • 1
  • 17
  • 35
13
votes
1 answer

Qt5 QGeoPositionInfoSource::createDefaultSource() crashes on Android 5.0

I'm developing a Qt5 application for Android (with CMake!) and currently I'm trying to read location data using Qt's QGeoPositionInfoSource. All of my application is doing fine so far but when I run auto source =…
frans
  • 6,905
  • 8
  • 40
  • 95
13
votes
3 answers

QThread vs std::thread

I saw different topics on "pthread vs std::thread" and "QThread vs pthread" but none on "std::thread vs QThread". I have to program a software to drive a 3D Printer and need to use threads. There will be a thread that will check safety constantly,…
ElevenJune
  • 349
  • 1
  • 2
  • 15
13
votes
2 answers

Disable specific items in QComboBox

In my application, I want to disable some items (i.e. not selectable, no highlights when mouse hovering above, and the texts are greyed out) in the QComboBox when certain conditions are met. I indeed found someone did ask the same question here:…
Wayee
  • 339
  • 1
  • 4
  • 15
13
votes
2 answers

Qt Quick Controls 2.0 Text Field Cannot Select Text

I'm having difficulty with selecting text on a TextField from Qt Quick Controls 2.0 with a mouse. When I hover over the TextField the cursor does not change from the cursor arrow to the cursor I beam and I am unable to select text. I verified text…
Frank Laritz
  • 185
  • 2
  • 7
1 2 3
99
100