Most voted "qt" questions
Qt is a framework for developing graphical interfaces written in C++ supporting a wide number of platforms. Applications can also be created with QML/Javascript. It is currently developed and maintained by Digia.
Learn more…186 questions
Sort by count of
-
3
votes0
answers1928
viewsDifference of QT versus GTK+ in features
Before we begin some considerations: The object of this topic is to search for facts/objects, therefore assumptions/kicks/spreads will not be accepted as answers. All responses should take into…
-
3
votes1
answer114
viewsReturns the previous month of an informed date in Qt
How do I return the previous month of the date reported in Qt, has some function in the QDate what does it do? I just found the one that adds addMonths. Example: month 04 reported returns month 03.…
-
3
votes1
answer115
viewsWhat is the difference between the quit and Exit methods of qApp?
I’m testing the example Getting Started Programming with Qt Widgets and found a call for a method to exit the application: void Notepad::on_quitButton_clicked() { qApp->quit(); } I took a look at…
-
3
votes1
answer134
viewsHow to customize "Notification Web API" in Qt?
I am creating a simple browser using Qtwebkit and added in it the "support" for Notification Web API using the QWebPage::setFeaturePermission. An example: function notifyMe() { if…
-
3
votes1
answer145
viewsHow can Qdialog lock a Qmainwindow?
I am implementing an experimental registration program, and I made a case where, if a person types nothing and tries to register this empty data, it opens a QDialog, receives the warning and does…
-
3
votes1
answer400
viewsWhich component to use in Pyqt4 to display records of an on-screen SQL query?
I’m developing a graphical Python desktop application using Pyqt4 (Qt Designer), my doubt is about which component use to display on my screen frmTelaPesqAluno records of an SQL query, and how to…
-
3
votes1
answer66
viewsQcustomplot how to resize graph?
I’m trying to do a repeat histogram of 255 events, I don’t know what is the maximum amount of times this event can occur! I have a array of 255 elements, already with the amount of repetitions of…
-
3
votes1
answer112
viewsHow to read a variable in setText()?
I need the text of a lineEdit is equal to a variable string. I’m using this code: void MainWindow::on_pushButton_clicked(){ string texto; texto= "mensagem"; ui->lineEdit->setText(texto); }…
-
3
votes1
answer669
viewsHow do I click an image and perform a function
The language is python and the graph is Qt4. I have a qlabel and a hidden widget. I need that when the qlabel is clicked the widget appears, and when it is clicked again it disappears. I researched…
-
3
votes1
answer192
viewsQt5 Deploy on Linux - No installation
I’m developing a solution in Qtcreator Qt version 5.4.2. Well, I have the following problem: When I run on my machine and on any Ubuntu Vivid (15.04) it works. But when I try to run on Ubuntu 14.04…
-
3
votes1
answer1079
viewsHow to block resizing a widget/window?
I am setting a certain widget according to the size of the secondary monitor. This I managed to do perfectly. However, as I am beginner with Pyqt, I would like to know how to block window resizing.…
-
3
votes2
answers93
viewsIs it possible to use Elide with Qlabel?
I’m trying to use the element QLabel and if the text execrates the width size it can look like this: Add 3 points to the right: Foo bar baz foo bar... Add 3 points from center: Foo bar ba...oo bar…
qtasked 7 years, 11 months ago Guilherme Nascimento 98,651 -
3
votes1
answer185
viewsHow to track mouse coordinates on a Qlabel?
Hello, I’m with a screen project using Qt Creator and I’m stuck with the following problem: I want to track the mouse coordinates by moving the cursor over a Qlabel. I saw in some other topics some…
-
3
votes1
answer246
viewsQT - Identify coordinates of an image in a different size Qlabel?
Hello, I recently had a question about how to track coordinates of a Qlabel using the mouse cursor. It worked fine for what I was thinking of doing. What I intend to do is the following, I have an…
-
3
votes1
answer538
viewsQt5widgets.dll error when it is installed to another computer
I’m trying to export an application built in Qt 5.7.0 (compiled to 32 bits, although development takes place in a Windows 10 environment, 64 bits) to another computer (this one with Windows 8.1, 32…
-
3
votes1
answer150
viewsIs it possible to determine the hardware address of the router?
I’m trying to get the hardware address of another device (actually the equipment connected directly, like a modem/router) on the same network, I was able to do this: foreach(QNetworkInterface…
-
3
votes1
answer87
viewsChange the property of a QML object by C++
I’m trying to change a property of an object (Rectangle) that was instantiated in the QML, but I am not able to perform it because the method findChild returns null. I am following the following…
-
3
votes1
answer84
viewsDownload great with Qnetworkreply::readall freeze for a few seconds
When using QNetworkreply::readAll to save the data to a QFile, the moment the download arrives at the end occurs a quick freezing of 2 to 4 seconds and also varies according to the network or site I…
-
3
votes1
answer81
viewsWhat safe practices can I use to store a password in desktop applications?
I plan to make an application with Pyqt5 to issue notifications based on an API I have. The user, obviously, in a first access would have to use the login and password, to access the application. I…
-
3
votes2
answers372
viewsQt - Check if table is empty in the database
I have an application with a database connection, when initializing the application I need to check if there is any record in the table, if a user should not be registered, when I run the query…
-
2
votes1
answer80
viewsBackground and icon on tableView
I wonder, how do I add in a tableView to the property of background and icone? I can already add the Background now is missing the icon. Code: class tableView : public QSqlTableModel { Q_OBJECT…
-
2
votes1
answer113
viewsMove square with mouse only on vector X or Y
I’m learning about the QgraphicsScene, QgraphicsItem I am trying to move two squares with the mouse in the window, but moving only in vector X or only in vector Y, but that they move only in one…
-
2
votes1
answer246
viewsImprove code to avoid slow particle collision
I need to divide space into cells. Each cell should be approximately the size of the particle radius so that a particle does not occupy more than 4 cells as in the illustration below: The r-ray…
-
2
votes1
answer432
viewsButton running shell script
By clicking the Save button, wanted the contents of the text box (which I typed or pasted into Plain text) was inserted at the end of a certain text file that exists in my home. This process I…
-
2
votes2
answers984
viewsError compiling project in QT Creator
I am seriously wanting to study programming and I chose the QT framework when I was with a dualboot on my computer there was this problem that I am having now after removing the dualboot and install…
-
2
votes0
answers37
viewsHow to incorporate qml modules into the executable?
When I run a program done in qml on another machine, it does not find the modules of the qtquick. I imagine an alternative to this and the incorporation of the modules into the executable itself.…
-
2
votes1
answer156
viewsQT: How to prevent changing the content of a Qtablewidget
The title of the question says it all: How can I prevent editing a particular column of a QTableWidget? I have already done some research and I think the solution is to use a few flags, but I…
-
2
votes1
answer72
viewsFormat string Qt html charset
I have the following string: Qstring str = "Macarr & # x and 3 ; the integral. < br/>" (I put space between all characters of the special character if it would not be visible and would…
-
2
votes1
answer307
viewsWhat is the difference between Qstring and Qstringliteral?
What is the difference between the two? What is the best to use?
-
2
votes0
answers111
viewsHow to use Geolocation API with Qtwebkit?
It is possible to use Geolocation API with desktop applications using QWebView? I tried to Qty Webkit and HTML5 Geolocation, but it doesn’t work. I tried to it’s the Qt5 position api support for…
-
2
votes1
answer761
viewsC++ class with multiple constructors - Header and cpp file
I have a C++ class where I have two constructors. In the file minhaclasse. h: public: MinhaClasse(int x1); MinhaClasse(int x1, int x2); Then in the.cpp file I create normally the constructors I…
-
2
votes1
answer1791
viewsIs it possible to make a "text for voice" with Pyqt?
I’m learning to play with Pyqt. I’m building a simple application, where there will be a voice notification when a new request is available. I wish my application written in Pyqt4 could "turn" text…
-
2
votes1
answer92
viewsArrow keys on QT
When we want to use Keyboard arrows in C++ we use the Ncurses or conio. h libraries, depending on the operating system. But there is a way to do this using the QT libraries ?
-
2
votes1
answer73
views -
2
votes1
answer524
viewsQt and Android - Take the path of a gallery image
I’m developing a code to get an image of Galeria do Android. I’m using QtAndroid to write in Qt a code equivalent to java. I already opened the gallery, selected the image and received the path, but…
-
2
votes1
answer85
viewsWhy do strings (Qstring) not appear during debugging in Visual Studio?
I have a program in Qt 5 I use QString to manipulate text strings. However, when I debug the program, I cannot see the contents of the strings (either in the "Auto", "Locals" or "Watch" window, or…
-
2
votes0
answers44
viewsMongo(3 shards) C++ Driver: Syncclusterconnection error
I’m having trouble running the upsert on Mongo when I connect to 3 shards on cpp. Now when I connect in just one of the shards I can do the operation. Does anyone have any alternative or knows the…
-
2
votes2
answers828
viewsHow to connect a Mysql database with QT on a local network?
Hello, at the moment I am Noob in manipulation of servers with databases. I am using Qt Creator 5.3 to develop my project, and have decided to incorporate a Mysql 5.7 database into it. I am trying…
-
2
votes1
answer563
viewsc++ - How to return a value to a previous window in Qt?
Hello, I am developing a project where I will have many calls from new windows and need to recover a value from these windows to the main window (Mainwindow). The problem is that it becomes…
-
2
votes3
answers431
viewsHow to convert variable to String?
I have a function that takes a postgresql database code and visualize setting in QLabel with the function setText(). The problem is that this code comes from the database in strange format, between…
-
2
votes1
answer257
viewsHow to convert str to python
I have to make a comparison between 2 items, one is in Unicode, and the other is in str, being that what is like str is an array. for bloqueiosPermanentes in arquivo:…
-
2
votes1
answer725
viewsDynamic table in python
I have a problem and I can’t identify the mistake. I am creating a dynamic table in Python where it will be filled with database information. The problem is the code is repeating the first line of…
-
2
votes1
answer390
viewsCapture date from Qdateedit
I need to pick a date QDateEdit. I did the designer using Qt Designer, in properties activated calendarPopup and the displayFormat for dd/MM/yyyy. I want to capture this date to insert in a query. I…
-
2
votes2
answers470
viewsHow do I get Qt 5.7 with MSVC2015 to work?
I’ve had Microsoft Visual Studio Community 2015 for a long time. I installed Qt 5.7 via online installer and includes msvc2015 (already marked) in the list of installation programs. I tried using Qt…
-
2
votes1
answer7520
viewsQt SQL - ERROR (42601): syntax error at or near
I am currently developing a program to assist in the management of a barracks in my city, I am using Qt to create the graphical interface and other libraries needed as the manipulation of databases,…
-
1
votes1
answer143
viewsHow to use the Qtreewidget Finditem in Pyqt ?
I have a tree QTreeWidget with several previously included items. I need to search for a string x has the same text value as mine QTreeWidgetItem, or I need to check all items in my tree. Does…
-
1
votes1
answer69
viewsUpdate a Tableview
How can I update a Tableview after closing a Dialog? Example: principal.ccp abre conexão com banco de dados principal::principal(){ //..etc..// model->setTable("nomeTabela");…
-
1
votes1
answer105
viewsInteger to price conversion using Qlocate
How can I use QLocate to convert integer into standard Brazilian price form (without rounding up the figures)? Code: QString n1 = "1.020,50"; QString n2 = "10,33"; int valor1 =…
-
1
votes2
answers287
views -
1
votes1
answer64
viewsHow to verify that a URL has been successful in QML?
In QML, I can run an external URL using: Qt.openUrlExternally(url); With this, I can, for example, open the Facebook app in a certain profile: var test =…