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].
8,729
questions
0
votes
0
answers
31
views
MOC (Meta-Object Compiler) in my Qt project where it's reporting an incorrect file name extension for a header file
Moc compiler throws this error when I run qmake.
home/user/workspace/project/include/data.hp:78: Parse error at ...
Interesting point, error line is correct. so just wrong thing that was reporting ...
0
votes
1
answer
24
views
qbs get directory where a library is located
I have a Product:
demo.qbs
import qbs
Product {
Depends { name: "the_library" }
}
directory the_library_set and qbs for the libraries:
the_library_set.qbs
import qbs
Project {
...
0
votes
0
answers
6
views
How to express argument of type QVariantMap in qdbus command line tool
I'm trying to use the following command :
qdbus org.kde.krunner /org/kde/krunner org.kde.KDBusService.CommandLine
The signature is the following :
org.kde.KDBusService.CommandLine -- ...
0
votes
1
answer
35
views
How Python QT two windows<based on .ui file> swtich
I create a main window use QT ui window file and
I want to click menu pop another ui window. this is second window,
and after close, the main window will get focus and get data from second window.
How ...
-7
votes
0
answers
40
views
Updating progress bar C++ in Qt [closed]
I want to see the value of the battery in percentage value. My battery is 48v dc. In Qt, i want to see the value using progress bar. How do i update the progress bar with respect to battery voltage ...
-2
votes
0
answers
20
views
Appearance of Residual Images When Moving Objects in a Qt Application 5.0 [closed]
When I implement separate objects in different classes and synchronize them in a widget, residual images appear when moving.
At first, I suspected that the issue was related to incorrectly set ...
0
votes
0
answers
12
views
Segmentation fault when colmap gui
I'm trying to use colmap on ubuntu-18.04, and the cmake and make install went smoothly. Using the command colmap -h also worked fine. However, when I use the colmap gui command, I encounter the ...
0
votes
0
answers
18
views
A proper way to init libqgit2 for QtCreator on macOS
I am a newbie to Qt development and trying to set up a dev environment on macOS with libqgit2.
I installed Qt Creator, created a blank project (CMake build system), downloaded libqgit from github and ...
0
votes
0
answers
8
views
Qt 5.12 QTest library output not shown in Windows output in Azure pipeline
I'm using Azure pipelines to build and test an application in both Linux and Windows.
The QTest output us shown perfectly fine in Linux, but information about failed tests are not listed in Windows.
...
0
votes
0
answers
18
views
Creating single WearOS package with app+widget from Qt5
I'm considering building a WearOS app (for Samsung Galaxy Watch 6). There will be the core app, as well as a widget (accessible by spinning the bezel on the watch)
This was easy on the Tizen ...
-1
votes
0
answers
12
views
Stop QT SingleApplication class from throwing "QXcbConnection: Could not connect to display" Error on load
I am trying to convert a QT window application to a QT console application. Previous solutions have hidden the window. The problem is my app was badly written and loads a QT SingleApplication class ...
0
votes
0
answers
20
views
Problem with graph visualization in a GUI developed with python and Qt5 using the setGeometry method
I'm trying to complete a GUI in python using PyQt5 (without using PySide2 due to problems with some drivers). It happens that the part of the window that should contain the graph does not appear in ...
-2
votes
0
answers
22
views
I encountered an error while trying to install qt5 on Macos catalina
I need to install geant4 and I am following installation guide and trying to download dependencies. I am trying to install qt5 using homebrew but I got some error.
macOS 10.15 catalina
https://geant4-...
1
vote
0
answers
22
views
Does QAbstractItemModel's sort notify the view?
I have implemented a custom QAbstractItemModel subclass, and from my understanding, the QAbstractItemModel::sort() method can be overridden in a derived class to implement custom sorting logic, which ...
0
votes
1
answer
47
views
How to forward declare a namespace with class and inheriting the class?
I'm currently trying to build a helper class for my QT ui-file implementation.
#include <QWidget>
namespace Ui {
class Form;
}
class Implementation : public QWidget, public Ui::Form {
...
-1
votes
0
answers
34
views
Compilation of Drogon with Mingw
I’m trying to replace the cutelyst framework with the drogon framework that I discovered not long ago.
I have to keep Qt but I have to replace cutelyst with drogon, I compile it with mingw in 32bit ...
0
votes
1
answer
32
views
Display Two Different Images in Two Different Image Controls using Image Provider in QT5
I have a Project Which displys image clicked by IP Camera it is Displying image unsing image Provider class and in Image Control now what i want is to click 2 images and disply that two images in two ...
0
votes
0
answers
18
views
CGAL (Specifically QT5) Installation Error
I am trying to install 32-bit QT5 using CGAL on my computer (I already installed 32-bit CGAL). I have a Windows 11 laptop and I am using the x64 Native Tools Command Prompt for VS 2022. The commands I ...
0
votes
0
answers
40
views
Why does updating one QSlider set the value of another QSlider?
#include <QtWidgets>
#include <QtCore>
#include <QtGui>
#include <iostream>
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
{
auto w = ...
0
votes
1
answer
38
views
Debugging QT symbols with CLion
Question
How does one get a debug view of properties of QT items? I'm currently using CLion.
For example, the application uses a QModelIndex.
I've gathered from documentation that QModelIndex is used ...
0
votes
0
answers
16
views
While Trying to integrate the libssh library with QT , getting key based authentication issue [duplicate]
I need to make an application that runs in Raspberrypi where I can transfer files using ssh from the host Windows machine to the remote pi. and also execute a few read-a-file commands there.
Hence I ...
0
votes
0
answers
29
views
Qtdesigner connection between MainWindow and multiple Forms
I am new to Qt, and trying to build Gui.
I have a simple question but i can't find any answer to it.
My Gui consist of MainWindow and some number of Forms.
Gui should work as follows:
Where is a ...
-1
votes
0
answers
43
views
How to change focusable items?
I have the following hierarchy of QWidgets:
Widget1
Widget2
Widget3
Widget31
Widget32
Widget33
I want to have widgets 1, 2 and 3 to be key navigable (tab and backtab) but not widgets 31, 32, ...
0
votes
1
answer
36
views
Qt5, QML, how to deliver some signal from background thread to multiple windows
I'am working on a small Qt5 project that needs to communicate with a piece of hardware and signal more than one window. I create an object (a thread communicating with a device) in main function and &...
0
votes
1
answer
33
views
Qt5 does not find struct member declared with Q_GADGET
Qt 5.15.10 on Embedded Linux.
I'm trying to do what suggested in this and this answers.
My goal is to access to Q_PROPERTY currentSong from QML.
My attempt:
class Songs : public QObject
{
Q_OBJECT
...
0
votes
0
answers
36
views
How to solve OpenSSL 1.0.2 private key being invalid in QT 5.12.2?
I am trying to generate a self-signed SSL certificate, write the cert and private key to file and lastly load the cert and private key with QT. I have confirmed the key and cert files to be valid with ...
0
votes
0
answers
21
views
How do I link the CGAL_USE_BASIC_VIEWER in a qt creator project builded with cmake?
I need to make an application that draws a Voronoi diagram given a set of points, for this I plan to use CGAL.
It asks me to add the "CGAL-Qt5" installation prefix to the folder in which one ...
0
votes
0
answers
23
views
How to add an hyperlink to a QImage in a QTextTableCell?
My application has a pdf report creator which displays a table with some information. One of the columns must display a location pin icon and when clicked this must open a link to a google maps ...
0
votes
0
answers
31
views
QT Project refactoring / General questions about qt project structures
I am working on a larger qt project, that I should refactor. At the moment this project is a single pro file with a lot of qml and image files. Since we could only use qml and no c++ till now (because ...
0
votes
1
answer
57
views
how to hide tracer and label on chart
I have one problem, i cant hide label and tracer after moving mouse cursor from one chart to another. My task is to make a tracer with a label appear when you move the mouse cursor over the chart, and ...
0
votes
0
answers
21
views
Use of real values in anchor margin
I was going through the QML documentation which says that the anchor margins can be **real** values.
e.g.
anchor
{
top: parent.top
topMargin: 10 // This is valid
left: parent.left
leftMargin: 80.45 /...
0
votes
1
answer
29
views
Use private Qt api (QWindowSystemEventHandler/QWindowSystemInterfacePrivate::WindowSystemEvent) with PySide2
In short, i am trying to record and playback native window events for testing purposes, because doing the same with regular QEvent feels unfeasible as it would require every QObject in the quick scene ...
1
vote
0
answers
61
views
How do I clean up my workerThread after calling quit on it?
I have a function which when is called creates a new thread called workerThread. It basically sends a network request and in the else block below, I have handled the case where a network error has ...
1
vote
0
answers
25
views
QDateTimeEdit shows wrong timezone
I'm trying to use a QDateTimeEdit widget in Python3 / PySide / QT5 but with a different timezone than the local time. Switching between local and UTC works but I can't get QDateTimeEdit to show a ...
1
vote
0
answers
53
views
QML draw grid on map
I have to draw squares on a map as to create a grid. Such squares should be related to the "geographic area" (not as in this question, where the grid is simply superimposed to the map).
The ...
0
votes
1
answer
61
views
Why doesn't qDebug output anything after clicking the button
I'm trying to implement one thing with signals and slots, and the problem arises that after pressing the button nothing happens, although the path to the file should be displayed. The button is made ...
0
votes
0
answers
28
views
Is it possible to make a video play instantly using QMediaPlayer?
I am using a QMediaPlayer to output a video that contains audio to a QVideoWidget. When I use a video without audio it plays instantly, but if the video has audio, it takes a few seconds to play after ...
0
votes
0
answers
40
views
QPainter::drawLine has problem in Large image's width
Recently, I had a problem in my application (So I provided a mini example of the problem) that I faced when creating large-scale images, and when I looked at the output image, it was not fully drawn! ...
0
votes
1
answer
42
views
How to use an object not declared in the UI file as signal receiver with QUiLoader?
I want to use multiple UI files for different components of my main window as well as the main window itself (because I for example want an extra UI file for the menubar and the toolbar, because both ...
-1
votes
1
answer
39
views
How to add new rows in a database?
I am creating a simple app for modifying SQLite databases.
I am trying to add new rows in MainWindow::on_AddButton_clicked() method, but when I use the MainWindow::on_reselectTable_clicked() method ...
-1
votes
1
answer
46
views
QDirIterator stuck
I'm having an issue where I'm using QDirIterator on Windows to gather the items from the desktop. For one user, it hangs up and I'm trying to get a bead on what the offending file would be. The ...
0
votes
1
answer
51
views
In qt5.15 qml how to deal with Native Function Exposure and JavaScript-to-Native Communication(caling a native function) using qml Webview
So I am using qt5.15.3 with qml and trying to handle Native Function Exposure and JavaScript-to-Native Communication
First I need to clarify my question
For example like in Java we have:
// In your ...
1
vote
1
answer
100
views
how to see variable values in locals and expressions of qt
I have qt 5.12.12 on Ubuntu with GCC as compiler and GDB as debugger. When debug hit on a breakpoint, almost all of my variables are shown as memory addresses in locals and expressions(only int values ...
1
vote
0
answers
48
views
Is there a way to take exclusive control of the keyboard and mouse in a Qt Quick application?
I'm attempting to write a program in Qt Quick that implements remote desktop functionality as part of it. One thing that would be helpful is to be able to take exclusive control of the keyboard so ...
0
votes
0
answers
122
views
Integrate a gstreamer pipeline under Qt 5.15.2 using Qt QML
Pre-requisites:
Gstreamer 1.16.1
Qt 5.15.2
Target Device: imx8 with Yocto
I'm trying to visualize a camera stream inside an item on one of our pages. For this purpose, we transmit the camera stream ...
0
votes
0
answers
22
views
Problem after Create Setup file Python Project (PyQt5) with cx Freez in user
Several of my own projects, which are separate independent programs, were created by myself after converting the Python file to an exe file in my own system and virtual machines. I encounter an ...
0
votes
0
answers
28
views
How should QChart be used to generate two different charts in concurrent mode?
In this code example two buttons are created:
The first one displays a graph in a new window
The second one prints a graph in another thread to make concurrent use and not hurt the main thread (it is ...
1
vote
1
answer
58
views
Set a tooltip for a hypertext link in a QLabel
I have a QLabel with an embedded link:
QString LinkName ("...") ;
QString DestName ("...") ;
QLabel* myLabel ;
...
myLabel -> setText (QString ("Click <a href=\"%1\&...
0
votes
0
answers
44
views
Implementing Qpushbutton in Qt and cpp
I want to implement a Qpushbutton like in the image below. I don't want it to be done in widget.ui but rather code it. How can I do it in stylesheet?
QPushButton *settings=new QpushButton("...
0
votes
0
answers
22
views
Spyder + Matplotlib plots: combined functionality of qt5 and plots tab
I'm on Spyder 5.4.1.
I'm trying to find a way to combine the qt5 plot functionality (panning and zooming most of all) with the clean organization and ease of access from the 'inline' plots tab.
f.e. a ...