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.

7821 questions
145
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,585
  • 2
  • 11
  • 9
78
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
  • 13,241
  • 13
  • 46
  • 73
67
votes
3 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
  • 831
  • 1
  • 7
  • 10
64
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,698
  • 1
  • 19
  • 32
61
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
  • 10,772
  • 21
  • 84
  • 127
56
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,264
  • 3
  • 17
  • 24
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
  • 10,877
  • 12
  • 60
  • 91
47
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
  • 15,203
  • 11
  • 57
  • 106
46
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
  • 63,456
  • 96
  • 348
  • 677
45
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
  • 4,148
  • 5
  • 23
  • 35
40
votes
7 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
  • 21,352
  • 16
  • 94
  • 169
38
votes
12 answers

Qt5 Target conditionals not found

I just updated to the latest version of command line tools in OS X Mavericks and now when compiling my (previously-working) code it throws the following error > clang: warning: no such sysroot directory: >…
BRabbit27
  • 5,565
  • 15
  • 81
  • 150
38
votes
4 answers

How to update component in Qt 5.2.1+?

I see this message: at least one valid and enable repository required for this action to succeed whenever I try to update components in Qt 5.2.1. I know it is a reported bug (take a look here and here) but I was wondering if anybody came up with…
Baso
  • 1,284
  • 2
  • 19
  • 37
36
votes
5 answers

Qt5. Embed QWidget object in QML

I am using Qt5 beta and trying to embed a QWidget-based object into QML. The goal is to use QML as much as possible, and only use QWidget objects where QML does not do what I need. I found a link explaining how to do this for Qt4.7, but I have not…
eatyourgreens
  • 993
  • 1
  • 11
  • 15
35
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
  • 12,102
  • 18
  • 74
  • 171
1
2 3
99 100