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.

1
vote
0answers
13 views

Problem with compile static QT with static openssl [MSVC]

I am trying to build Qt 5.12.3 (MSVC) statically with linking static openssl. I started the cmd from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin then i run the below command to setup ...
0
votes
0answers
27 views

Lose chunk of my data when i try to send image in QByteArray via QNetworkAccessManager in json

I compared the data i send and recieve and it is turned out that the end of my data, which i recieve on my server is cut, is QNetworkmanager has a request lenght limit? photo struct. typedef struct ...
0
votes
2answers
18 views

Is this the Minimum Viable TreeView Model in QML (Qt - 5.9)?

I'm making a folding list of three items: "Hey", "Whats", and "Up?". I want to put it into a tree view. I know this list will only ever contain these three items. Therefore, I would like to know how ...
0
votes
0answers
23 views

QTcpSocket: decoding received data

I need to decode the data received from Universal Robot UR5 server. The data received is below. Can somebody please help me with decoding this message using Qt5 c++? \x00\x00\x04T@\xE2\xB2\xB8\xD4\...
0
votes
0answers
17 views

Qt with QWebEngine install with yum

Using Ubuntu 14.04 I had a dilemma that the QWebEngine was not available with the "apt-get" Qt install. I figured out that I need to add the "ethereum" software repository: sudo apt-get install ...
2
votes
1answer
74 views

A slot as a paramater in a lambda function in C++ / Qt

I have a lambda method which I would like to receive a slot as a parameter I have ended up with: auto createShortcuts = [ = ]( const QString &sequence, const std::function < void () > &...
0
votes
0answers
24 views

How ensure QWebEngineView is fully rendered before taking screenshot?

I want to take a screenshot of QWebEngineView for a page with a large image. When running code below red background is rendered correctly but the image is not. How can I ensure the page is fully ...
0
votes
1answer
25 views

Why Qt plaftorm plugin “xcb” cannot be loaded even though it was found?

I cross-compiled Qt5.12 in my laptop and installed it on a Raspberry Pi 3 that runs Raspbian Stretch OS. I'm trying to remote debug (from QtCreator) applications running on RPi. When I run my Qt apps ...
1
vote
1answer
16 views

Qt- Moving a QGraphicsItem causes artifacts.Leaves trailes behind

When i move a QGraphicsItem, weird artifacts stay behind.Some parts of the item dont render,other render... In the note.cpp i have a shape QPainterPath Note::shape()const{ QPainterPath path; // ...
0
votes
0answers
13 views

How to fix 'Project ERROR: Unknown module(s) in QT: serialbus' with qt static-build

I'm setting up static-build for Qt application with Windows 7. I can build application without static-build setup in the same machine. Qt version-5.10.0 in windows 64bit. Compiler - MinGW-32bit I ...
0
votes
0answers
8 views

QT VsAddIn error Object reference not set to an instanse of an object

My Qt version - 5.12.3 VS version - 2017 Builded Qt from sources as follows: SET _ROOT = D:\Qt\src SET PATH = %_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH% configure -static -static-runtime -...
0
votes
0answers
21 views

Using Qt Undo Framework With QPainter

I am creating a drawing application with Qt and want to include undo and redo commands for whatever is drawn on a QImage. For this, I want to at least try and incorporate the Qt undo framework, since ...
1
vote
1answer
44 views

How does setContextProperty() fail in this situation?

I have got three classes created in C++ as Window, PropertyList and MyParams and I want to pass PropertyList and MyParams these two classes to qml. class Window { public: PropertyList* ...
0
votes
1answer
18 views

Qt - QSharedMemory qipc files location

On Linux, Qt creates the following files in the /tmp directory when using QSharedMemory: qipc_sharedmemory_mysharedmem5ffa537fd8798875c98e190df289da7e047c05 ...
1
vote
0answers
60 views

Append a Very Big String

When I try to add a big QString (size:104806123) to a QPlainTextEdit I get an exception :C++: std::bad_alloc void LogFileialog::add(QString &logLine) { ui.log_plainTextEdit->...
4
votes
2answers
93 views

If-else condition in loop: future iterations overwrite results of previous iterations

I try to highlight a selectedItem and its children among a list of items. const QList<Item *> items = /* ... */; Item *selectedItem = /* ... */; Q_FOREACH( Item *item, items ) { if ( ...
3
votes
0answers
50 views

How to get a signal when window manager is done resizing window in qt QML?

I'm trying to achieve a similar effect as iTunes' miniPlayer when resizing happens on macOS. That is, detecting when a resizing of the the window has been completed, THEN resizing the height to a ...
0
votes
1answer
28 views

Creating windwows Qt app that does not launch cmd window

I've a cross platform app (it's a basic ellipsoid drawing example using Qt).It compiles and I can execute it form a command prompt. For linux I know how to create a .desktop file so I can launch the ...
0
votes
0answers
44 views

Qt: Random segmentation faults at constructor in unit testing

I have a Qt GUI project for which Im writing test cases using QTest. I have MainWindow class which is the GUI class. All the test cases were executing properly.But suddenly, I started getting random ...
0
votes
1answer
25 views

QTest covering paint method

I have custom QWidgets where all the painting is done manually (fillRect, drawRect, drawText, drawPixmap..) . There are up to 120 properties affecting what's going to be paint, how it's blinking and ...
1
vote
0answers
31 views

How to produce correct coordinates of a point by using glReadPixels and gluUnproject?

I am using QGLWidget and QtOpenGL to display my point clouds and glReadPixels and gluUnProject to pick a point from a poiint cloud. The problem is that the glReadPixels does not seem to pick pixels of ...
0
votes
1answer
51 views

how to keep yellow Rectangle in my demo code can't be moved?

This demo is from official demo of drag and drop. I have changed a little. Now when other rectangle enterd the mousearea including the yellow rectangle, the yellow rectangle won't move. And yellow ...
0
votes
1answer
24 views

Qt Library 'mysql' is not defined

I have a problem with Qt connecting with MySql, when i run this code QSqlDatabase DBObject = QSqlDatabase::addDatabase("QMYSQL"); DBObject.setHostName("localhost"); DBObject....
0
votes
0answers
8 views

QSqlDatabase: QMYSQL driver not loaded

I have a problem with Qt connecting with MySql, when i run this code QSqlDatabase DBObject = QSqlDatabase::addDatabase("QMYSQL"); DBObject.setHostName("localhost"); DBObject....
0
votes
1answer
22 views

Setting the icon color of a ListElement in QML

I have a ListModal as follows: ListModel { ListElement { icon: "qrc:/icons/gallery/20x20/profile.png"; icon.color: "transparent"; title: "Profile"; source: "qrc:/src/qml/pages/Profile....
1
vote
1answer
22 views

Why I cannot use Java-Style QMapIterator in QMap.erase()?

I'm trying this code in Qt 5.12: //Definition of map QMap<int, ZoneData*> mapId2Pointer_; //Some values filled in mapId2Pointer_ here... QMapIterator<int, ZoneData*> ...
0
votes
0answers
17 views

Is it possible to update QML FileDialog model?

I'd like to use a FileDialog in a QML app but somehow tweaking the model to display the files slightly differently. It would group sequence of file as a single element, i.e. file001, file002, ... as ...
-1
votes
1answer
34 views

QT Networking Crashes

I'm getting SIGSEGV on accessing the Reply object of a network request. If I do this, it works fine: QNetworkAccessManager manager; /** * Main entry point. */ int main(int argc, char *argv[]) { ...
0
votes
1answer
31 views

QT: addLayout causes crash

I was trying to rewrite a simple "find dialog" example without using pointer as the class members. I cannot figure out why this code causes crash of this example //finddialog.h #ifndef ...
0
votes
0answers
27 views

How to fix “Undefined reference to” error in Qt c++ [duplicate]

I'm developing my game with included shared library and ran into a small problem when trying to compile my project. I linked this library in .pro file: #---------------------------------------------...
0
votes
1answer
14 views

How to read a BLOB with qt-type compression?

I have a file (about 100k files, to be specific) containing a data from weather radars - one file is a one radar image. It is a mosaic of data from several radars, creating a map of a reflectivity ...
0
votes
1answer
23 views

qml Anchoring with something inside a Row

Imagine I want something like that : INPUT1 | INPUT2 | INPUT3 ------------------------------------ FIELD1 | FIELD2 | FIELD3 FIELDBIS1 | FIELDBIS2 | FIELDBIS3 I will do ...
2
votes
2answers
66 views

How does Qt share OpenGL contexts behind the curtain?

I am writing an application that: Continuously renders stuff offscreen in a pipeline that has private OpenGL context & private thread Draws some of the previously rendered textures in widgets In ...
0
votes
0answers
24 views

How can I inform views in separate windows when using MVC in a Qt/c++ project?

I use MVC pattern, sqlite database in my code. I want to show my same data in different views, in the separate windows at the same time. Also, I want to update my data. I implement the model in a ...
0
votes
0answers
13 views

In PyQt5, matplotlib's FigureCanvasQTAgg in QScrollArea is not working fine

I'm creating an application with PyQt5. I want to add a chart with long width, so I tried to add the graph into a QScrollArea. I wrote the code below using FigureCanvasQTAgg of matplotlib from ...
1
vote
1answer
39 views

How to integrate Qt into an existing C++ project

I am in the process of teaching myself C++. I have completed many tutorials, which have all been console projects and I've been using Visual Studio Community 2019 for those. Now I started to work on a ...
0
votes
0answers
14 views

Can opencv functions be mocked while writing the unit testing in qt using gmock?

I am trying to do unit testing for some openvino and opencv related code in qt using gmock, which includes calls to opencv API's like cv::circle, cv::rectangle,cv::putText and many more. I am ...
-3
votes
0answers
22 views

QT command line application to load images from folder and create texture atlas [on hold]

I want to create an QT based or multi-platform application which will load images from folder which is passed as command line argument to application. Then create texture atlas from those images. ...
0
votes
0answers
23 views

How to use QStateMachine correctly for serial network requests

I need to make several consecutive requests based on the size of the text. I know about QEventLoop, but I want to avoid using nested loops and I need to have the ability to abort my network requests. ...
0
votes
0answers
10 views

How to open a QNetworkSession to a WiFi AP specifying which physical interface to use?

My computer has 2 wlan interfaces: One integrated ("Wi-Fi") and an external adapter ("Wi-Fi 2"). How can I make my Qt application establish a connection to a given access point (AP) through the second ...
0
votes
0answers
44 views

Display bitmap data in QT view

I'm writing an image library from scratch I have written a console application that loads a bitmap image does some manipulation and writes the output to another bitmap. Now I would like to build a UI ...
0
votes
0answers
28 views

How do I convert an image to a binary image in QT?

I have a normal .jpeg-file that I want to convert to a binary file with only pure black and pure white colours. I have already managed to convert an image to grayscale with code in QT. QPixmap ...
1
vote
1answer
38 views

How to connect signals to slots between 2 shared libraries

I have 2 shared libraries. I the first one I implemented some core components for a particular class. class CoreClass : public QObject { Q_OBJECT public: void doSomeStuff(); signals: void ...
-1
votes
0answers
35 views

Handling Mouse Events in a worker Thread in QT

Is it Possible to handle the mouse events in a worker Thread in QT? If so, please let me know how to do it. Any sample code is much appreciated.
0
votes
1answer
41 views

Qml listview add new row to a sub vector in the model

I have got a custom structure defined in C++, which contains several variables among them is a QList variable. I can now add a new structure dynamically in Qml listview, but my question is I also want ...
0
votes
0answers
18 views

Unwanted frame in the lower right corner of a QScrollBar [duplicate]

When I style a QScrollBar using QSS I get an extra frame in the lower right corner of the scroll area. Any idea of how to get rid of it? My current QSS-file looks like this (simplified) QScrollBar {...
-2
votes
0answers
42 views

Video Conferencing Application in QT without using Multimedia libraries [on hold]

i have just started Qt and want to develop Video Conferencing Application. I don't want to use the QT Multimedia or any other multimedia libraries available. If it is possible please let me know ...
0
votes
0answers
23 views

Create Dockable Widgets in QML [duplicate]

Create Dockable Widgets in QML Hi I have created Qdockwidgets using Qt widgets but when it comes to qml we don't have in built dockwidget. Can you please help me in creating dockwidget using QML
0
votes
0answers
27 views

How to fix 'GLib-GObject-WARNING / CRITICAL'

i'm writing some code in Qt, and when I use QColorDialog there is a freeze of the application with the following output: GLib-GObject-WARNING **: 10:53:36.573: cannot register existing type '...
3
votes
1answer
37 views

Cannot connect signal from an outer shared library to overloaded slot of QWidget derived class

I try to connect the signal from an outer shared library to an overloaded slot of base QWidget class's slot. Suppose this is an instance of a class derived from QWidget class MyClass : public ...

http://mssss.yulina-kosm.ru