Questions tagged [qt5]

Questions specifically for version 5.x of the Qt library. If your question applies to other versions of Qt, use the tag [tag:qt4] or [tag:qt3]. It is recommended to use with the tag [tag:qt].

Qt (pronounced officially as cute (/kyut/) though commonly pronounced as (/ˈkyu ti/)) is a cross-platform application development framework widely used for the development of GUI programs (in which case it is known as a widget toolkit), and also used for developing non-GUI programs such as console tools and servers. wikipedia

Qt is developed and maintained by The Qt Company which is subsidiary of Digia.

Qt also provides an integrated development environment named Qt Creator. Though it mainly aims at creating Qt applications, it can be used to create regular C++ applications too.

Resources:

Tagging recommendation:

You will often see questions tagged specifically as , or to indicate that the user experiences the problem in Qt 3.x, 4.x or 5.x, respectively. The default when version information is lacking is to assume version 5.x of the API.

8717 questions
164
votes
4 answers

Connecting overloaded signals and slots in Qt 5

I'm having trouble getting to grips with the new signal/slot syntax (using pointer to member function) in Qt 5, as described in New Signal Slot Syntax. I tried changing this: QObject::connect(spinBox, SIGNAL(valueChanged(int)), …
dtruby
  • 1,775
  • 2
  • 12
  • 9
85
votes
6 answers

Project ERROR: Unknown module(s) in QT: webkitwidgets

I am porting code from qt4 to qt5. I added the following line to my .pro file, as suggested: QT += webkitwidgets However, when I run qmake, I get the this error: Project ERROR: Unknown module(s) in QT: webkitwidgets I am developing on Ubuntu 12.04…
user1251007
  • 15,891
  • 14
  • 50
  • 76
74
votes
4 answers

How to create/read/write JSON files in Qt5

Qt5 has a new JSON parser and I want to use it. The problem is that it isn't too clear about what the functions do in layman's terms and how to write code with it. That or I could be reading it wrong. I want to know the code on creating a JSON file…
Jim Kieger
  • 901
  • 1
  • 8
  • 13
67
votes
3 answers

Is there a tutorial specifically for PyQt5?

I am looking for a PyQt5 tutorial. It is rather complicated to start GUI development with Python for the first time without a tutorial. I only found some PyQt4 tutorials so far, and since something changed from Qt4 to Qt5, for example the fact…
WeGi
  • 1,908
  • 1
  • 21
  • 33
65
votes
4 answers

How to generate video file from QImage sequence using QMediaRecorder in Qt5 C++

Basically what I want is to encode a video using QMediaRecorder by supplying as a source a sequence of QImages that I generate in custom code at run-time. So far I have found no easy way to do this, and everything points at the solution where I have…
Mr. Developerdude
  • 9,118
  • 10
  • 57
  • 95
63
votes
4 answers

Building Qt 5 on Linux, for Windows

I wanted to migrate my Qt 4 app to use Qt 5 instead. These instructions failed, due to some differences with how MXE builds Qt 5, including the fact that it uses modularised Qt tarballs, instead of one large tarball.
tshepang
  • 12,111
  • 21
  • 91
  • 136
59
votes
2 answers

Is there any difference between QRegularExpression and QRegExp?

I see there is a new class for regular expressions - QRegularExpression. Is it just a typedef for QRegExp, or a new class, or what? And why do we need it, we already have QRegExp?
sashoalm
  • 75,001
  • 122
  • 434
  • 781
57
votes
3 answers

Qt Creator, ptrace: Operation not permitted. What is the permanent solution?

While debugging C++ code in Qt creator I get the following error ptrace: Operation not permitted. Could not attach to the process. Make sure no other debugger traces this process. Check the settings of /proc/sys/kernel/yama/ptrace_scope For more…
Indra
  • 1,308
  • 3
  • 18
  • 24
56
votes
1 answer

QTextEdit vs QPlainTextEdit

What's the difference between QTextEdit and QPlainTextEdit, why use one over the other? I'm coding a text editor as an exercice to learn Qt5, and now I'm wondering whether to use QTextEdit or QPlainTextEdit. So far I've only found out that you can…
Markus Meskanen
  • 19,939
  • 18
  • 80
  • 119
50
votes
5 answers

Building Qt5 with Visual Studio 2012 / Visual Studio 2013, and integrating with the IDE

How do you get Qt5 to download and integrate with Visual Studio 2012? What are some of the problems you will encounter, and how do you solve those problems? UPDATE re. Visual Studio 2013 Successes are reported with Visual Studio 2013 as well, and…
MirroredFate
  • 12,396
  • 14
  • 68
  • 100
50
votes
6 answers

How to find the Qt5 CMake module on Windows

I'm trying to make a very basic Qt5 application using CMake on Windows. I used the documentation of Qt5 to use CMake, and my main.cpp file just contains a main function. My CMakeLists.txt is exactly: cmake_minimum_required(VERSION…
dzada
  • 5,344
  • 5
  • 29
  • 37
46
votes
6 answers

Dark theme for Qt widgets?

Background I'm building a PyQt5 application, that I'd like to have a dark theme for. Previously I've worked with Android development where there was a dark theme that I could set for a whole application Question Is there a dark theme built into Qt…
sunyata
  • 1,843
  • 5
  • 27
  • 41
45
votes
1 answer

Qt5 VideoOverview example does not work. Any solution?

I am stuck for a month with a video example given in Qt Video Overview. I tried that code, but I only get a blank square (QWidget). I am using GStreamer0.10 for media playback over Qt5. I also played video with gst-launch-0.10 command and it works…
user5585984
45
votes
3 answers

Disconnecting lambda functions in Qt5

Is it possible to disconnect a lambda function? And if "yes", how? According to https://qt-project.org/wiki/New_Signal_Slot_Syntax I need to use a QMetaObject::Connection which is returned from the QObject::connect method, but then how can I pass…
alexandernst
  • 14,352
  • 22
  • 97
  • 197
43
votes
8 answers

Image rounded corners in QML

To my surprise, the Image component has no radius property. I tried emulating the rounded corners by putting the image in a rounded Rectangle, but it does not clip the corners. Rectangle { anchors.right: rectContentBg.left anchors.top:…
Tamás Szelei
  • 23,169
  • 18
  • 105
  • 180
1
2 3
99 100