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].
902
questions
168
votes
4
answers
82k
views
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,...
33
votes
10
answers
88k
views
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 ...
40
votes
5
answers
32k
views
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 ...
65
votes
4
answers
40k
views
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 ...
18
votes
2
answers
19k
views
Error LNK1104: cannot open file 'Debug\MyProjectLib.lib'
I have the following CMakeLists.txt file to generate my project based on Qt:
cmake_minimum_required(VERSION 2.8.12)
project(MyProject)
find_package(Qt5Widgets)
set(MyProjectLib_src ${...
4
votes
2
answers
3k
views
How to build Qt 4.8/5.2 statically under VS2012, using the static MSVC runtime, with Windows XP support?
I'd like to make a completely static build of Qt 4.8/5.2 under VS2012 - including static runtime libraries, and targeting Windows XP systems. This is not supported out-of-the-box by Qt, since even the ...
35
votes
5
answers
53k
views
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 ...
26
votes
7
answers
118k
views
Qt5 - setting background color to QPushButton and QCheckBox
I'm trying to change the background color of a QAbstractButton (either a QPushButton or QCheckBox) in Qt5 and having zero luck.
This does nothing:
pButton->setAutoFillBackground(true);
QPalette ...
50
votes
5
answers
69k
views
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 ...
32
votes
4
answers
70k
views
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 ...
9
votes
2
answers
7k
views
Easiest way to subclass a widget in Python for use with Qt Designer
I'm building an app using PyQt5, with (most of) the GUI being built using Qt Designer. I have a few UI elements that do mostly the same thing and it seems sensible to move their code into classes ...
10
votes
1
answer
17k
views
QtWidgets.QFileDialog.getOpenFileName returns a Tuple
I've recently updated to the new version of Qt5 for Python. In doing so, I've been having to alter my code in accordance to some of the notable changes that have occurred. I wanted to get some insight ...
86
votes
7
answers
66k
views
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 ...
28
votes
2
answers
30k
views
How to insert QChartView in form with Qt Designer?
I want to add QChart to the form. But I can't find it in the Widget Box. So I created it in the code. How can I insert it in QWidget or QFrame or something else?
I want to set area of that widget ...
5
votes
3
answers
27k
views
How to set stylesheet for the current item in QTableView
When QTableView edit control is visible for the current item the shylesheet of the edit takes place. When there is no active edit control in the QTableView the current item is styled using the ...