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
39
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,354
  • 4
  • 19
  • 41
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
  • 6,333
  • 17
  • 90
  • 161
38
votes
4 answers

Qt Layout, resize to minimum after widget size changes

Basically I've got a QGridLayout with a few widgets in it. The important ones are 2 labels, which I use for drawing images to the screen. Well, if the user wants, he can change the resolution of the incoming images, thus, forcing the Labels to…
Hafnernuss
  • 2,659
  • 2
  • 29
  • 41
38
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
  • 1,053
  • 1
  • 12
  • 16
37
votes
1 answer

CMake cannot find Qt5LinguistTools in Docker / Ubuntu 18.04

My simple Dockerfile: FROM ubuntu:18.04 RUN apt update && apt upgrade -y RUN apt install build-essential cmake qt5-default -y RUN apt install qttools5-dev-tools -y When I check linguist inside the container it's there: root@9087245330a7:/# which…
juzzlin
  • 45,029
  • 5
  • 38
  • 50
37
votes
1 answer

What is the difference between a QWindow and QWidget

The Qt 5.0 provides a new QWindow class. While the documentation on this class is quite comprehensive, I am failing to see how exactly the QWindow is different from the QWidget class, and in which cases you would prefer the former. Both provide a…
Yellow
  • 3,955
  • 6
  • 45
  • 74
36
votes
6 answers

Do I have to include all these Qt dlls with my application?

I'm totally new in using Qt and I don't know a lot of stuff. As a test I created a simple application using Visual Studio 2012 and Qt-VS-Add-in based on the newest Qt5.1 After I compiled the application it didn't work for me (gave errors), I…
Alaa Salah
  • 885
  • 1
  • 13
  • 23
35
votes
2 answers

What is the signal for when a widget loses focus?

In a dialog, when the tab key is pressed, the focus changes to another widget. In Qt, is there any signal for when a widget loses its focus? Can I use it to check if the input is valid or not? If not, can I set the focus back and ask the user to…
user1899020
  • 13,167
  • 21
  • 79
  • 154
35
votes
5 answers

Get HWND on windows with Qt5 (from WId)

I am trying to convert a Qt4 Application to Qt5. The only thing I couldn't figure out is how to get the HWND of a Widget. The program uses EcWin7 to show the progress on the taskbar icon on win 7+ but expects a HWND. The lib itself seems to compile…
Josef
  • 1,467
  • 2
  • 24
  • 40
34
votes
6 answers

QML: List all object members/properties in console

Is there any way to list all object members/properties in QML & Qt 5.1? Such as: var obj=myQObject; console.log(obj) // expected output: // obj { x:123..... } This would be very helpful for debugging.
tirth
  • 813
  • 1
  • 8
  • 16
33
votes
1 answer

Range slider in Qt (two handles in a QSlider)

I need a range selection using QSlider. Is it possible to get two handles, if not, is there any piece of code available to handle that smartly? Below is an image illustrating what I need.
Sivam
  • 1,099
  • 3
  • 12
  • 25
33
votes
10 answers

Qt5 Static Build yields Failed to load platform plugin "windows"

I am writing a Qt application on Windows using Visual Studio 2012. Using the Qt Add-in and a custom built static distribution of Qt 5.0.2. I am running into the dreaded "Failed to load platform plugin windows" error whenever I run the…
Dave
  • 7,283
  • 12
  • 55
  • 101
32
votes
4 answers

How do I use Qt in my Visual Studio 2015 projects?

We have large project that used .NET Framework for showing forms/windows. Recently I decided to deprecate CLR dependency and move to Qt. While learning Qt, we've migrated from Visual studio 2013 to 2015 and then I noticed that there is no qt support…
Croll
  • 3,631
  • 6
  • 30
  • 63
32
votes
3 answers

QWebView or QWebEngineView

Are there any functional differences between QWebView and QWebEngineView? If I understand correctly, QWebView is webkit, while QWebEngineView is blink. Are there any differences to the programmer? Does one offer more customization of look & feel…
graywolf
  • 7,092
  • 7
  • 53
  • 77
32
votes
8 answers

Application deployed with QT5 libraries does not start on Windows 7

Recently we have been migrating our QT based application on Windows from QT 4.8 to QT 5, and we have run into a issue with deployment. Note that our app has not changed, we have only built it with new QT5 framework. With some effort we got it to…
Aki
  • 3,709
  • 2
  • 29
  • 37