Category "qt"

Why qt project can throw errors like undefined reference to `__imp_ Py_Initialize' and so on?

I want to add python functions in C++ code. The project is written using qt. In Mask.pro I have: ... INCLUDEPATH += "D:/workplace/Python/include" LIBS += -L"D:/

The icon of QPushButton is blurry when DPI scaling is enabled

I found the icon of QPushButon is blurry when DPI scaling is enabled. Even if replaced by SVG, the icon is still blurred. Is there any way to make the icon clea

My pointer does not point on the same value when its call in a slot QT C++

I do a pokemon project with a Qt interface. I created a class Trainer and Pokemon : class Pokemon { protected: string itsName; doub

QPolarChart hide radial tick labels

I have created a QPolarChart and I want to hide the radial tick labels but leave the tick circles. I simply want to get rid of the text which shows "0.0", "20.0

Qt C++ : Cannot instantiate class derived from QAbstractListModel

Using Qt wizzard I created ToDoListModel2 class derived from QAbstractListModel. Code: todolistmodel2.h #ifndef TODOLISTMODEL2_H #define TODOLISTMODEL2_H #incl

Why am I getting QWindowsWindow::setGeometry: Unable to set geometry warning with Qt 5.12.0

I migrated some code from Qt 5.6.0 to 5.12.0. Suprisingly, I'm getting lots of warnings related to QWindowsWindow::setGeometry. Whenever a dialog is shown on to

How do I rearrange menu bar options in Qt Designer 5?

I have been unable to figure out how to easily rearrange the menu bar selections that I have created in Qt Designer. Older documentation indicates that I can pr

Something in Visual Studio is constantly changing my c++ header Item Type assignments...how to track down the source?

I have a MSVS 2019 C++ project which includes Qt source files that are processed by the Qt moc. In order for my header files (and thus, class declarations) to b

VisualGDB visual Studio 2022 QT application for Linux

I was working with qt application for raspberry pi using visualGDB cross compiler in 2015 it was working fine for me, but after 5 years I restarted the project

How to only allow the user type numbers and comma in the qml textField?

I want print the value of textField, but I want that the user only can type numbers, "," and / TextField { id: textField1 implicitWidth: 200 implic

How do I debug an app on the Mac that accesses the camera?

My Qt C++ app captures video from the camera on the Mac. It has the NSCameraUsageDescription value set in its plist file. But, not surprisingly, this doesn't he

Qt: Animating QPixmap

The answer code is located here (https://stackoverflow.com/a/50550471/4962676):https://github.com/eyllanesc/stackoverflow/tree/master/50550089 The answer was m

QT: qmake not recognising 3dcore, 3drender

I am using qmake to compile my QT project. In my .pro file I have a line: QT += 3dcore 3drender 3dinput 3dextras When executing qmake myprofile.pro I get the

Qt Window incorrect size until user event

I'm creating a screen where users can add certain tiles to use in an editor, but when adding a tile the window does not correctly resize to fit the content. Exc

QMediaPlayer and Segmentation Fault

Hello Guys i used just this simple example to play music with this code: QMediaPlayer *mediaPlayer { new QMediaPlayer }; mediaPlayer->setMedia(QUrl(currentMe

Passing data from Qdialog to main window in Qt

I am trying to pass data from a Qdialog (Login dialog) to my mainWindow after a successful login and was wondering if it is possible to use Signals and slots to

How to connect in Qt signal and slot in dynamically added buttons to get in slot index of added button?

I have list with pointers QPushButton: QList<QPushButton*> listButtons; In this code I am adding dynamically buttons listButtons.push_back(new QPushBu

How to handle macOS dock Quit action in QML app?

I have a simple ApplicationWindow that should prevent quitting by overriding onClosing signal. However, when the app is closed from macOS dock, the onClosing is

How to customize QModbusDataUnit to send hex values in modbus?

I would need to customize the QModbusDataUnit by sending custom hex via modbus, below my code, I'm trying to customize the post but I do not understand how to d

<command-line>:0:3: warning: ISO C++11 requires whitespace after the macro name

I am compiling qt sources (C++) on different version of Ubuntu OS (14.04 and 16.04 LTS). The sources compile (g++) on 14.04 LTS without warnings. But on 16.04 g