Questions tagged [qt]

Qt is a cross-platform application development framework widely used for the development of application software that can be run on various software and hardware platforms with little or no change in the underlying codebase, while having the power and speed of native applications. Qt is available with both commercial and open source licenses.

Filter by
Sorted by
Tagged with
0 votes
0 answers
37 views

VS 2022 generates double moc.obj files

If I try to compile a simple Qt project, I receive 6 linking errors: mocs_compilation_Release.obj : error LNK2005: "private: static void __cdecl MainWindow::qt_static_metacall(class QObject *,...
Giovanni Scordilli's user avatar
-7 votes
0 answers
24 views

Need Qt/ Linux dialog that mount USBs, displays and navigate only the USBs [closed]

I need a Qt dialog with a list of USBs attached to the system. It'll also need a mount feature so the USBs are mounted at a specified location. It must mount USBs, displays and navigate only the USBs ...
James S's user avatar
  • 894
-3 votes
0 answers
24 views

How to input Chinese in Qt WebAssembly

I am using Qt's QML to write a GUI,and I want to run it in WebBrowser. I have already configured WASM(WebAssembly) in qtCreator successfully and my programe can run in browser as well. However, when I ...
Vivian Green's user avatar
0 votes
0 answers
33 views

Module import fails when I use external library in qt embeded python

I am trying to embed python in c++ (Qt) but there is a problem to import external libraries to python file during the compile and run Qt app and error is "Failed to import module" based on ...
Javad H's user avatar
0 votes
1 answer
34 views

Calling QGraphicsLineItem::boundingRect inside QGraphicsLineItem::shape causes a crash

I am trying to create a drawing application using Qt. When selecting a shape, I found that the selection range was too limited to the shape, making it difficult to select. Therefore, I overloaded the ...
Natural_User's user avatar
1 vote
1 answer
38 views

Why is QJsonDocument::fromJson failing to parse a simple value?

QJsonParseError err; auto doc = QJsonDocument::fromJson ("true", err); qInfo () << doc.isNull () << err; Output is: true 5, which indicates a parsing error, and "5" is ...
Bogudan's user avatar
  • 101
1 vote
0 answers
21 views

Why is the mouse wheel scrolling speed faster in qmlscene?

main.qml: import QtQuick 2.15 import QtQuick.Controls 2.15 ApplicationWindow { visible: true width: 400 height: 400 title: "List" ListView { width: parent.width ...
Velkan's user avatar
  • 7,211
0 votes
0 answers
20 views

Pyside2 How To Get the window pops up to the front

Scenario It's a pyside2 program running in Liunx system. There is a menu that every item in it is a exec. Every time I clicked the item, the exec starts if it's not started. The exec will pops up to ...
Nie's user avatar
  • 1
1 vote
0 answers
32 views

No video and only audio output when restarting QMediaPlayer's media

I'm currently developing an application using Qt 5.15.2 on Ubuntu 22.04 and encountering an issue with QMediaPlayer in a video playback context. I've provided my code below for reference. The ...
ysncck's user avatar
  • 111
1 vote
0 answers
47 views

Runtime dependency not found but it's there in the runtime path?

I am trying to run my application which requires a dependency libother; and libother requires its own dependency libfftw3. Both dependencies are located in the same folder on Ubuntu 22.04 LTS. I build ...
RPH's user avatar
  • 55
0 votes
1 answer
33 views

Changing the size of a child widget when zooming with the wheel of the parent widget

I have a parent widget(QWidget). I draw a mesh on it using the paintEvent method. This widget has a child widget (QWidget). The child widget can only move through the grid cells of the parent widget (...
Валентин's user avatar
-3 votes
0 answers
49 views

Unable to display anything on a QOpenGLWidget subclass [closed]

I want to display some points (x, y, signalLevel) on an OpenGL widget (transmitted from another thread) but when I try to display a simple square, I can't see anything on the widget. After checking, ...
Sunna's user avatar
  • 1
-1 votes
0 answers
31 views

Function Pointer From Static Method Qt6 C++

I'm trying to create a function pointer to a static method using C++ in Qt Creator. I'm using a version of Qt6. I'm getting an error when running my attempt. Here is my attempt. //return_type (*...
CorkiMain's user avatar
-1 votes
0 answers
31 views

The best way to handle different filters on model [closed]

I have a QStandardItemModel and a QSortFilterProxyModel that handles a regexp filter on a name column with the data being displayed in a QTableView. I want to add more filters on different columns (...
banjo bill's user avatar
-1 votes
0 answers
25 views

How can I compile a Qt project file into a 32bit executable file on a 64bit Linux?

I'm working on a GUI design. The designed code will run on Raspberry Pi 4. However, the ready-made system consists of a 32-bit Raspberry Pi. Therefore, the exe file of the code I compiled should be 32 ...
Hamza Tamer's user avatar
0 votes
1 answer
36 views

Check the current Item of a QML StackView

I have a main page containing a StackView with multiples pages: Main Menu, param1Page, param2Page, …. I want to display a home button to the main page if the activated item is not "Main Menu"...
MMyster's user avatar
0 votes
0 answers
30 views

How to deploy a Qt application from one Ubuntu to another

I built a Qt 5.15.1 application on Ubuntu 18.04.5 LTS and I am trying to run it on a newly installed Ubuntu 22.04.3 LTS, before sending it to a colleague. I have: created plugins and platforms ...
Pete Smyth's user avatar
0 votes
0 answers
36 views

mac to linux ssh: error when opening gnuplot

When connecting to my Linux workstation from my Mac laptop via SSH I want to plot some data in gnuplot. When I do this I get this error: qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could ...
operator's user avatar
  • 165
-2 votes
0 answers
27 views

%Matplotlib notebook interactive plot only shows up after stopping the cell

I'm trying to run interactive plots and enter information about them through a for loop, but it shows up blank until I stop the cell from running, and then the plot shows back up. The plot is also ...
abkeaton's user avatar
0 votes
0 answers
24 views

Loading MainWindow Qt Creator .ui design into QMainWindow subclass with PyQt6 results in different appearance [duplicate]

Loading an UI design from Qt Creator: and attempting to load and subclass the .ui file a results in a "borderless" window: What is happening when subclassing it? I'd like it so both appear ...
handle's user avatar
  • 5,947
5 votes
0 answers
26 views

How add new options to the dock icon menu

There are some default options that appear when a macOS application in added to the dock like Quit, Hide, Show in Finder, etc. I want to add few more options to the dock menu for my Qt application. I'...
Vipul Gupta's user avatar
-1 votes
0 answers
28 views

Press any keys after QTableWidget get focus, program crashed

I write a barcode scanner program. I set focus on QTableWidget which in StockWidget. When program startup, I press any keys and Enter, a new row was inserted. I clicked into Stock Num SpinBox, then ...
Wang Yu's user avatar
-2 votes
0 answers
39 views

How to append git commit SHA at the end of version string in Qt/GCC? [closed]

I want to be able to build with version string in two forms: major.minor.release major.minor.release-revision where revision is substring of git commit SHA in form a1b2cdef. I can define separate ...
CrazyDriver's user avatar
0 votes
0 answers
47 views

Binds that comes from QML leads to trailing null missing from STR bind value in Oracle

I Have a code in QML that sends some strings to a Qt code that at last are used as bind values from a query in Oracle The QML calls a method from a class in Qt through Q_INVOKABLE macro. The method ...
Fabio Paolini's user avatar
-1 votes
0 answers
21 views

PyQt5 progressbar animation never finishes

I wanted to produce smooth animations for a QProgressBar widget in PyQt5 application. But after the start value of the animation is setted, the QProgressBar value won't increase. I have tried making ...
KhodeNima's user avatar
0 votes
0 answers
27 views

Custom QToolTip.showText closes immediately

I'd like to display a tooltip when somebody selects an item from QComboBox. My code is as follows: def on_tooltip(): QToolTip.showText( self._w.combo.mapToGlobal( QtCore.QPoint( 0, 0 ...
Meir Tseitlin's user avatar
0 votes
0 answers
37 views

slot that have multiple parameters in QT [duplicate]

I am in new Qt.I tryed that sinyal slot connection. But my slot function have three parameters. I used pressed button as sinyal. But connect function that i written is error. How to pass multiple ...
Hasan Atlı's user avatar
-3 votes
0 answers
21 views

telegram desktop qt project not opening

I need to change the original version of Telegram Desktop, I installed all the files, uploaded them to visual studio, but I can’t open them in qt visual studio tools. How to open a qt project using qt ...
Айнур Рахимов's user avatar
0 votes
2 answers
37 views

Baking a QML Project into a Yocto Image

I am trying to get more familiar with the toolchain to compile a QML project with CMake and bake it into a Yocto image. However, I am having issues with the configurations. I am using the QML example &...
Bjørn Ironside's user avatar
0 votes
0 answers
43 views

How to stream video from camera using QT6 and GStreamer

Currently I am trying to develop videochat application that stream video from camera over rtmp. So, I need something like mediaRecorder->setOutput(QUrl("gst-pipeline: appsrc ... rtmpsink")...
zealot's user avatar
  • 53
-4 votes
1 answer
64 views

C++ error on VIsual Studio using Qt version [closed]

I'm using Visual Studio to study and modify a c++ code. When I upload the code on VS it gives the error on the picture, #include <QApplication> enter image description here I checked the Qt ...
Mattia Dignani's user avatar
0 votes
1 answer
60 views

How to read a .tar.gz file in into a buffer in C++ [duplicate]

I want to read a .tar.gz files contents into a byte buffer. I don't want to make a system call "tar" because the program should be multiplatform so it should be a universal solution. The ...
kaan kaya's user avatar
0 votes
0 answers
32 views

How to Integrate QT qml and QT Widget based applications, or How to use qml components on top of QT Widget applications [duplicate]

I have a QML based application with top, left, bottom and center component, The center component is a map. I have a QT widget based complete map application. I want to use this QWidget based map ...
Mohammad Imran's user avatar
0 votes
0 answers
21 views

How to set QTextEdit formatting to preserve quote indentation, superscripts, and subscripts?

I'm working on making an application that has a rich text editor that saves in Markdown format. As Markdown obviously isn't capable of displaying many rich text features, I'm limiting the formatting ...
ArrayBolt3's user avatar
0 votes
0 answers
48 views

Context menu behavior difference Linux vs Windows [closed]

I noticed that on Windows the context menu activated on right-click is closed and immediately reopened at another location on second right-click. On Linux (for instance KDE Plasma) the menu is closed ...
JavierG's user avatar
  • 202
0 votes
0 answers
43 views

Customizing QPrintDialog - Need to remove access to disk storage

I need to customize the QPrintDialog in the Qt framework. The default view has controls that give access to local storage on the device. All access to local disks must be disabled on the dialog. This ...
James S's user avatar
  • 894
2 votes
1 answer
83 views

Calling update() doesn't trigger paintEvent()

I am trying to draw a line at the center of a widget, so I tried to call paintEvent() by using update(). However, paintEvent() does not get called. Why is that? test_paint.h: #ifndef TEST_PAINT_H #...
rainbowfart's user avatar
-1 votes
0 answers
46 views

qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""

How can I solve this problem? qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "" This application failed to start because no Qt platform plugin could be ...
Anastasia Butkevich's user avatar
-1 votes
0 answers
31 views

Qt Custom Popups/Widgets

When I press a button, I want these to be accomplished: Open a rectangle like a container Have two QLabels : Title & Description For example, something like this: diagram I tried to use the ...
wooungcha's user avatar
0 votes
1 answer
21 views

How to Properly Set a QCursor with a Mask?

I am implementing a remote desktop protocol and need to display the cursor bitmap from the remote desktop on the local client. This involves setting mouse pointer types with monochrome bitmaps. ...
gao.xiangyang's user avatar
3 votes
1 answer
52 views

The tr function does not translate a word, while the translate function does

There is such code: int main(int argc, char *argv[]) { QApplication app(argc, argv); QTranslator translator; const QString dir = "/usr/share/qt6/translations"; if (...
Name Surname's user avatar
0 votes
2 answers
45 views

QStandardItem object has no attribute findItems

Hello I am trying to oragnise multiples paths in one treeview but this code is not working I got error like below : AttributeError: 'QStandardItem' object has no attribute 'findItems' its like ...
amine jisung's user avatar
-3 votes
0 answers
36 views

Using Qt5 in a docker in VS Code [closed]

I'm trying to use and code a Qt project using qmake in Ubuntu using docker, and trying my best to qmake and make my project to push the MyApp.exe to Windows and open it, but it's never working. I'm ...
Maschanck's user avatar
0 votes
1 answer
38 views

PySide6: How do I resize a QLabel playing a QMovie and maintain the movie's original aspect ratio?

I would be very grateful for your help specifying the re-sizing behaviour of a Pyside6 QLabel displaying a QMovie such that the original aspect ratio of the movie (e.g. a .gif file) is maintained when ...
Tranquille's user avatar
0 votes
1 answer
49 views

Intercepting ill formated link clicks with QWebEngineView in PyQt6

I would like to intercept any click on a link, including a baddly formated one, in a PyQt6 WebEngineView. For example, in the following code snippet the page becomes blank if I click the link "...
RealPlants's user avatar
-2 votes
0 answers
42 views

I have a question about Android file permissions in QT

Now, I am trying to make android mp3 application using qt I wrote source code below. QString path1 = "/storage/emulated/0"; QDirIterator it(path1, QStringList() << "*.mp3", ...
no name's user avatar
  • 47
0 votes
0 answers
61 views

SIGILL (illegal instruction) when running eventFIlter in Qt application using new version of CLion and MinGW

I'm building a Qt6 application with CMake on CLion. The app ran just fine a day ago and it started throwing SIGILL errors which I traced to inside every of my eventFilter functions. I've just updated ...
Mathieu Monfort's user avatar
1 vote
1 answer
62 views

How to disable text selection in a QDoubleSpinBox?

I want to make (or at least know If this is even possible) text that appears in QDoubleSpinBox to be unselectable. Right now, it looks like this: I have managed to make it so that the QDoubleSpinBox ...
Veljko's user avatar
  • 97
0 votes
1 answer
25 views

How to add translation file to Qt in Ubuntu

I am not able to create a translation file in a Qt Creator Widgets project. In main.cpp, mainwindow.cpp and mainwindow.h, I have: #include <QTranslator> In the pro file I have TRANSLATIONS = ...
MoritzMoreira's user avatar
0 votes
0 answers
55 views

Resizing a QOpenGLWidget causes memory increase [closed]

Every time the QOpenGLWidget window is resized, the memory increases. I don't know what causes it. What I am referring to is Qt5.9 Examples-qopenglwidget project. I tried clearing all three functions:...
Backstree's user avatar

1
2 3 4 5
1716