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 6.2, released in September 2021. 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. The latest released major version is Qt 6.x so, when not specifically mentioned, version 6.x of the API should be assumed for questions posted after September, 2021.

Spelling

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

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:

Check out the official Qt documentation for more details of recommended books about Qt programming.

85593 questions
15
votes
1 answer

Instruments keep telling me I have memory leak

I am new to mac and instruments, I use it to test the my Qt app, I found a lot of leaked objects, almost all of them are coming from Qt lib.I check my codes very careful but can't find the problem. To avoid the problem of memory leak, I strictly…
StereoMatching
  • 4,971
  • 6
  • 38
  • 70
15
votes
4 answers

multiprocessing GUI schemas to combat the "Not Responding" blocking

What are the best ways to create a multiprocessing/ GUI coding system? I would like to create a place for the internet community to come and find examples on how to use the multiprocessing module in python. I have seen several small examples of…
chase
  • 3,592
  • 8
  • 37
  • 58
15
votes
2 answers

How to support window.print() in a embedded web browser?

I want to create a print button for an HTML file. Well, window.print(). But this does not work because the web browser embedded in the software was developed by my company itself. It does not support print. This web browser was using WebKit, and I…
slayerxj
  • 273
  • 1
  • 8
15
votes
2 answers

Can I force visual studio to use mingw compiler

I don't like qt creator as IDE and love VS, but I must use exactly mingw compiler. Sad story :'(
Juriy
  • 565
  • 1
  • 5
  • 17
15
votes
2 answers

Is Qt3D a part of Qt5?

I have installed Qt5 libraries in windows but there is no document about Qt3D in Qt assistant. Is Qt3D a part of Qt5 or it has been removed from release version 5?
Hesam Qodsi
  • 1,569
  • 3
  • 25
  • 38
15
votes
3 answers

QTabWidget tabs on the vertical, but text in horizontal

I'm trying to make an app in C++ Qt with a sidebar like this one: But when making QTabWidget's orientation to West, it makes the text vertical. How to have the text on the left, but horizontally-aligned? Ps: I don't need icons. Thanks in advance.
Délisson Junio
  • 1,296
  • 4
  • 21
  • 43
15
votes
1 answer

Keep QPixmap copy of screen contents using X11, XDamage, XRender, and other tricks

I'm attempting to solve what I thought would be a very simple problem. I want to keep a QPixmap updated with the entire screen contents. You can get such a pixmap by doing this: QDesktopWidget *w = QApplication::desktop(); if (w) { QRect r =…
Thomi
  • 11,647
  • 13
  • 72
  • 110
15
votes
2 answers

How to make Qt GUI apps in C++ without memory leaks

I haven't been able to create a Qt GUI app that didn't have over 1K 'definitely lost' bytes in valgrind. I have experimented with this, making minimal apps that just show one QWidget, that extend QMainWindow; that just create a QApplication object…
Toerndev
  • 715
  • 1
  • 6
  • 21
15
votes
3 answers

Qt qrc resource file - can't load icon

I have a Qt5 desktop project and I added a "resource.qrc" file with the Qt Creator editor which created the following line into the project's .pro file: RESOURCES = resource.qrc I put a blank prefix and a png file (14x14) and I tried to use it like…
Johnny Pauling
  • 12,701
  • 18
  • 65
  • 108
15
votes
4 answers

Qt question: How do signals and slots work?

How do signals and slots work at a high level abstraction? How are signals and slots implemented at a high level abstraction?
Trevor Boyd Smith
  • 18,164
  • 32
  • 127
  • 177
15
votes
2 answers

Simple color fill QIcons in Qt

I need to create a menu that changes the background of a QWidget. I'd like to place a QIcon that represents the selected color into the QActions which populates the QMenu. I'd like to not have to pop out Photoshop and paint the icons manually. Is…
jliu83
  • 1,553
  • 5
  • 18
  • 23
15
votes
2 answers

How to build GSL with msvc2010?

I'm working with Qt 4.8.3 and QtCreator, which I've compiled with msvc2010 as per the instructions here. Now however I need to link to GSL (Gnu Scientific Library), but currently I only know how to build it with g++ which produces linker errors…
Matt Phillips
  • 9,465
  • 8
  • 44
  • 75
15
votes
2 answers

Configuration for optimizing QtCreator compiler

I'm using QtCreator in Windows 7. I want to configure it to use third level optimization (-O3) for c++ compiler. How can I do this to speed up my code and what changes are necessary?
batista cori
  • 543
  • 2
  • 6
  • 18
15
votes
5 answers

QString::number() 'f' format without trailing zeros

I want to convert number to QString with 3 significant digits. QString::number(myNumber,'f',3); does the job but remains trailing zeros. How to use it without them. Also I've tried 'g' and which shouldn't remain those…
krzych
  • 2,126
  • 7
  • 31
  • 50
15
votes
6 answers

QML animations visible property changes

I want an animation to be painted when an element becomes visible (is should appear smoothly, not the whole at all) I tried this states: State { name: "iconOff" when: iconOnSwitch.checked == false PropertyChanges { target: selectIconRow;…
marmistrz
  • 5,974
  • 10
  • 42
  • 94
1 2 3
99
100