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 ...

0
votes
0answers
2 views

Qt widget packages/skins for UI

I have a simple question of the UI widgets with respect to Qt-based (commercial) software development. For schedule/design/quality issues, I seriously consider using custom UI widgets, including ...
-3
votes
0answers
31 views

Qt using fileName in two places

I made a code that is suppose to take the filename input form the QFileDialogue and then I want a button to be clicked and for a program to be run on the text document. However for some reason it ...
0
votes
0answers
12 views

Qt make Qt::Leave Event trigger when x amount of pixels away from widget

I'm trying to make a custom window system that only responds to a widget's relative positioning for every action, including dragging the widget and resizing the widget. However, I have this blinking ...
-1
votes
0answers
10 views

Qml Qt.resolvedUrl called by child

In my project I have a qml file called ItemA.qml with the following property : property var currentPath: Qt.resolvedUrl(".") In another place, I have a qml file called ItemB.qml. Import ItemA 0.1 ...
1
vote
1answer
23 views

How to use MFC Ribbon in the Qt application?

I am started to implement the microsoft ribbon interface on the qt library but finally understand that it is too complex task for me. So I decided to use native mfc ribbon inside my application. ...
0
votes
1answer
8 views

QT QPrinter printing partial page

I inherited some Netbeans QT C++ code and the PDF with QPrinters prints fine but printing to a printer only half the page prints. The code is fairly straight forward. It looks like something is ...
0
votes
0answers
19 views

Qt matchmaking Server

I want to build a matchmaking globe server,so that players on the internet can connect to and find an opponent, every player is represented by a QTcpSocket on the server. My question is how to make ...
0
votes
1answer
12 views

Organize Qt project files in folders, and simplify the includes

Brief How do I tell my sub-project which are its subdirectories, in pro file, and not have to prefix the subdirectories in each #include directive ? Problem description I have a large project, ...
0
votes
1answer
37 views

why Overlapping comparisons always evaluates to true in following

I do not understand why following code has warning stating that overlapping comparisons always evaluate true. Next statements are never executed. QVariant MainModel::data(const QModelIndex &index,...
0
votes
1answer
23 views

Can I use QCommandLineParser to determine GUI mode or CLI mode?

One of the programs that I work with has two modes that it can run in: GUI (Graphical User Interface) mode or CLI (Command-Line Interface) mode. We determine which mode to use via a command line ...
1
vote
0answers
25 views

Qt5.11.2, QSqlDatabase and MariaDB on iMAC

I'm trying to connect to a MariaDB on my iMAC. I know the database name, the user name and password to connect are correct. I've installed Qt5.11.2 and I'm trying the following: QSqlDatabase db = ...
0
votes
0answers
6 views

Qt qml MediaPlayer/Video reproduces only Sound (without Video)

I use the player in QML, installed the k-lite-codec package and tried to play the mp4 and avi video formats, but it does not play them, only the sound. Why is this? What's wrong? After closing the ...
0
votes
0answers
11 views

Scrolling grid background with QML

I am trying to make a kind of game with a background that scroll to infinity. To make it work, I used a Rectangle and a layer. The layer is used for the color of the background. The layer is used to ...
0
votes
0answers
15 views

Qt error ‘convertVolume’ is not a member of ‘QAudio’

I'm working with the multimedia examples included in Qt Creator 4.7.1. Specifically, I open and run without problems audioinput example. If I create a new own desktop project and copy/paste the ...
0
votes
2answers
15 views

QML alias : unable to find id using layer

I am trying to make an alias of a ShaderEffect, however, when I do that : Item { id: root; property color colorBackground: Qt.rgba(0.9, 0.9, 0.9, 1.0); property color colorStroke: Qt.rgba(...
0
votes
0answers
21 views

Getting problem in drag and drop of thumbnail image inside the image view?

I will ask the same problem 1 month before. link:- QT drag and drop image from thumbnail to gridlayout (QVTKOpenGLWidget)?. I will get the solution but that one solution is only working inside the Qt. ...
1
vote
0answers
14 views

How to impliment multiple combo box selection functionality in qml?

I am just getting started with qml and trying my hand in Qt quick controls 2.2. I have two combo boxes, combobox1(that allows multiple selection) that has the items: Continents i.e Europe, Asia etc. ...
0
votes
0answers
37 views

Qt / C++ QImage sometimes file is not loaded. But file is accessible

In our C++/Qt4.8 application we are using QImage to add images to our documents we print. Sometimes we expierence issues with printing the image, and the image will be printed out blank (just a empty ...
0
votes
0answers
26 views

How set QTcpServer listening alone on port using Win7

I use a QTcpServer that should listen alone on port. Language is c++ with Qt 5.9. The application must run under Win and Linux using MingW. The listen method from QTcpServer uses standard parameter ...
-2
votes
1answer
26 views

QT GStreamer Windows linker problems

I'm trying to compile and run the qml-sink example which is provided inside the gstreamer-good-plugin (QT Example). But currently I get a lot of undefined reference errors during the compile time. It ...
0
votes
0answers
25 views

How to add QML map to QGraphicscene?

The app have QGraphicscene(mpscene) with QGraphicsView(mpGraphicsView) i am trying to add qml map object to QGraphicscene(mpscene) But map view come separately like popup window. How can i add this ...
1
vote
1answer
46 views

Qt5 throws std::bad_alloc

I'm trying to use QCustomPlot in my console application. I started by creating a simple wrapper for it that's suitable for my uses. The wrapper was supposed to However, I get std::bad_alloc errors ...
0
votes
0answers
32 views

Qt C++ Graphics View get Mouse Position on Click

I'm pretty new to Qt. I have a QGraphicsView in my main window and I'd like to get the position of the mouse (0,0 being the top left corner of the graphics view object) when clicked inside of the ...
0
votes
1answer
30 views

Python QT change the background color of a button, not just border

I am trying to change the background color of a border using python Qt but only the border gets set. This is the code: from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore ...
1
vote
0answers
15 views

QGraphicsItem not rendered as HiDPI

In a Qt mapping application (QGIS), the map canvas is a QGraphicsItem. We do not use any OpenGL, every element is rendered using QPainter. Our application is correctly displayed on HiDPI except for ...
0
votes
0answers
24 views

Unable to Schedule local notification in Qt android

I am trying to create local scheduled notifications with Qt for android app. I was following this answer : Unable to schedule notification with AlarmManager on Android (using Qt) but i am not able to ...
1
vote
0answers
35 views

in >> qstr or qstr = in.readLine()

I want to find alternative for cin >> #include <QDebug> #include <QTextStream> #include <QString> int main(){ qDebug() << "Test start"; QTextStream in(stdin); ...
0
votes
2answers
37 views

QThread::idealThreadCount() always returning “2”

I need to display, in a QSpinBox, the number of cores, or threads, that the CPU has. The problem is: QThread cpuInfo(this); //get CPU info ui->spnBx_nmb_nodes->setValue(cpuInfo.idealThreadCount(...
0
votes
0answers
16 views

save rtsp stream with qmediaplayer or gstreamer

i would like to ask you guys if it is possible to save an audio rtsp stream in a file using qmediaplayer or gstreamer. I am using windows and qt 5.11.1. I've tried with QAudioProbe but it doesn't work ...
0
votes
1answer
24 views

How to use Keyboard input in Qt5 for Execution of function xyz? [duplicate]

i am doing some experiments on Keyboard Input in Qt5 and now after I did some research I couldn't find a simple way to execute Code if a specific button is pressed e.g. Button R. Now my Question is ...
0
votes
0answers
34 views

Create common shared library in Qt

I want to create Qt shared library, that is able to connect in non-Qt project. Is it possible? Here is my point: I have created 2 (blank) projects in Qt Creator - Qt-qmake based shared library and ...
0
votes
0answers
14 views

QT Creator iOS Error : The settings in the Devices window of Xcode might be incorrect

I am trying to run a QT application to iPad. I could run the same in Mac OS. But, when run with iOS device it is getting an error 'The settings in the Devices window of Xcode might be incorrect'. ...
0
votes
0answers
22 views

Different behavior by platform of same code (GStreamer Android x Linux)

I am trying to deploy my very small application on Android, but i have encountered a problem. Same code have different behaviour. In file below i am trying to connect to RTSP stream and after that, I ...
2
votes
1answer
64 views

How to add an icon to a QGroupBox title?

Is it possible to add an icon (programmatically, via QtCreator, with or without a stylesheet) to the QGroupBox title? I want to place a mark close to the title of some of the QGroupBoxes in my GUI. ...
0
votes
1answer
47 views

Font Rendering difference in windows and Linux, Qt Cpp

I have, QFontMetrics m_fm(QFont("Arial",14)); and m_fm.width("Existing LAN IP Address from Project Network"); returns '297' (on windows) can anyone tell me what it returns on linux compiler? and ...
0
votes
1answer
16 views

Other criteria to tableview's section?

I'm asking me if it's possible to use other "criteria" than "FirstCharacter" and "FullString" with the "section.criteria" to tableview's section. For example, I need to pick the two firsts characters ...
0
votes
0answers
29 views

Why am I getting bad request from google?

My objective To exchange refresh token for access token from google using OAuth 2. My code bool Google_Account::Refresh_Access_Token_Using_Refresh_Token() { // Prepare Url QUrl url(tr("...
2
votes
2answers
68 views

How to align a primitive checkbox with the center of QHeaderView's column header?

I have a custom QTableView model with a custom QHeaderView in order to render a checkbox used to perform a "select all" function on the table's contents. In my header's overloaded paintSection() ...
1
vote
1answer
29 views

how to position the QIcon in the Qt table item?

I want a table cell with text aligned to the left and icon aligned to the right side. But now, im getting both icon and text left aligned, here what i have tried QtTableWidgetItem * item = new ...
2
votes
1answer
30 views

Custom QScrollArea widget

I am trying to create a class derived from QScrollArea, so I can promote ScrollArea to my custom class in form editor. I have this code: #include <QWidget> #include <QVBoxLayout> #include ...
1
vote
1answer
23 views

Qt 5.10 QGraphicsView cannot scale QGraphicsScene to fullscreen

I am experimenting with Qt 5.10 QMultimedia on Ubuntu 16.04 to play Gstreamer recorded videos. The meat of the application is shown below. I cannot seem to get the video to scale to the full Qt screen ...
0
votes
1answer
24 views

How to get type of media in QMediaPlayer (video or audio)?

I want to draw image in video widget when video is not playing. But I don't know how to check if media is not video. The problem is that source file extension can be mp3, but it is video. ...
0
votes
0answers
7 views

Qt QMessageBox Gui works when compiled for linux but not for windows

I have a program that I have compiled for both linux and windows. In linux everything runs smoothly, however in windows I get an error when I try to use a QMessageBox to pop up either a success or ...
0
votes
1answer
67 views

How to keep std::thread from freezing GUI in QT?

I am working on a project where I will be ingesting multiple binary files, decode them, and convert their data into a CSV. I figured the quickest way to do this would be to thread the work. Simply ...
0
votes
0answers
41 views

Qt Quick application locks up when 25 application windows are created

I'm experiencing a problem where my Qt quick application will lock up after opening 25 ApplicationWindows. I have no idea why so I wrote this simple test app to reproduce the issue. It begins by ...
1
vote
0answers
22 views

cross compile Qt5.10.1 Raspberry pi3 B+ stretch

I am trying to cross compile Raspberry pi3 B+; stretch software 2018-06-27 release, using Qt5.10.1, through Linux ubuntu 64bit according to this steps: https://wiki.qt.io/RaspberryPi2EGLFS For sure I ...
-1
votes
0answers
13 views

Trying to understand Size Constraints and Size Policies in Layout

I'm a few weeks into QT. On this forum, I found varying recommendations for how to apply size policies and size constraints. I am having trouble understanding the concepts involved in this. Suppose I ...
0
votes
1answer
39 views

Passing objects to multithreading objects Qt

I wonder is it thread safe to pass another objects to the object that runs in another thread than GUI thread. I mean by that is it thread safe to do something like that? What is happening with this ...
-2
votes
0answers
21 views

QT SIGNAL and SLOTS (LABEL BLINK) [duplicate]

I wish to make a QLabel blink i.e once RED then GREY and so on. I am using signals and slots to make this happen. void MainWindow::whenblink() { ui->labelRefId->setStyleSheet("QLabel { ...
-1
votes
0answers
13 views

Undefined reference for qt signal if the header file is in another directory [duplicate]

I have a header file for QtDice class //qtdice.h #ifndef QTDICE_H #define QTDICE_H .... class QtDice : public QMainWindow { Q_OBJECT public: QtDice( int number, QWidget *parent = nullptr );...