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
- 
		19 votes2 answers1037 viewsHow to use Qt translations directly with Qapplication::tr()In an application developed in Qt I have a non-visual class (i.e., that is not inherited from a QWidget) but that handles text strings that must be presented to the user. To use the Qt translation… 
- 
		15 votes1 answer205 viewsWaiting for a signal within a QquickimageproviderI’m creating an application using QML and the Qt 5.2. In her a ListView displays multiple items, each with an image and associated text. The image is built based on data uploaded from a server by… 
- 
		12 votes2 answers4009 viewsFormat decimal with comma and thousand with dotHow can I format a float for the Brazilian value format(price)? Example: in php number_format($float,2,',','.') separates decimal with comma and unit of thousand with dot.… 
- 
		11 votes1 answer172 viewsDifficulties with selecting items in a QtreeviewSetting: I have an application that manages a list of images of human faces with prototypical emotional expressions. I created a class inherited from QAbstractListModel to provide the model (model)… 
- 
		11 votes1 answer127 viewsQvideowidget displays nothingI’m trying to use the classes QMediaPlayer and QVideoWidget to display a video on a system I’m producing. Only these class rays don’t work as expected. The QVideoWidget just doesn’t show up, doesn’t… 
- 
		9 votes2 answers990 viewsHow to verify collision between particles?I need to know how to make each circle collide with each other along with the part of how I’m going to go in such a direction after this collision. This is the class of the main program window:… 
- 
		9 votes1 answer261 viewsOptimize the collision between particlesI need to optimize as much as possible the algorithm that makes the particles collide, is there anything that can be done to do that? And I also want to add a background image, it’s possible?… 
- 
		8 votes3 answers9428 viewsHow does serial communication work and how do I use C/C++?I use the Debian 7.1 and need to make serial communication between a computer and a microcontroller using C/C++. I’ve done a lot of research on the subject, but the articles and examples I found are… 
- 
		8 votes1 answer211 viewsQT + Opencv on Mac Os 10.10.3 with error: Symbol(s) not found for Architecture x86_64I recently installed Qt Creator and Opencv. I was able to easily compile QT and Opencv separately. But I can’t compile both together. My file .pro is like this:… 
- 
		7 votes2 answers4418 viewsWhat does it mean to create an object with that asterisk?Although I knew programming for a reasonable time, learning C++ with QT, I came across something I hadn’t seen in other languages. I noticed that some objects (not all) need to be created with an… 
- 
		7 votes1 answer711 viewsHow does the class constructor statement in Qt work?I work with C and a little bit of Assembly, in Atmel AVR microcontrollers. I’m trying to understand how the framework Qt extends C++. I created a new project with Qt Creator (Widgets), and generated… 
- 
		6 votes1 answer197 viewsDisplay a dynamically loaded text/photo pad with QML for AndroidI’m writing an app using the newly released Qt 5.2 QML for Android. On one of the screens I need to display an article that is loaded from a server and may change after the launch of the… 
- 
		6 votes1 answer830 viewsERROR: This application is failed to start because it could not find or load the Qt Platform plugin "windows"I am in error when running a program that was created with Qt , it generates the photo error! This error is generated when running exe, all the dlls indicated in the Walker dependency are in the exe… 
- 
		6 votes2 answers790 viewsLinux-based c++ Qt program to run on WindowsPeople wanted to know if there is any way and if there is what, to basically create an executable ,of a GUI program made in Qt, for Windows being that I am using Linux. 
- 
		6 votes1 answer1949 viewsWhat is the difference between Debug and Release?I started having the error: "Microsoft C++ Runtime error library". And I got many problems trying to fix this error. I was using Qt Creator with mingw32 in mode debug, but I realized that this mode… 
- 
		5 votes3 answers457 viewsLock the window zoomHow can I block the window rise QDialog and QWidget? For example, in the Skype login window you cannot enlarge the window. 
- 
		5 votes2 answers592 viewsHow to convert a Std::string to a Qstring?I’m trying to make a simple dialog box display my name. See the code. Pessoa *p = new Pessoa("Ronald Araújo", "[email protected]", 23); QMessageBox msg;… 
- 
		5 votes1 answer214 viewsHow to use qtwebkit-plugins in my project?Qtwebkit-plugins is a library that provides functionalities for QWebView, as SpellCheck/Corretor ortografico and Notification Web API. Read about in: SpellCheck Notification Web API I tried to… 
- 
		5 votes0 answers180 viewsQcamera Windows "failed to start"I made an application with QT where I make the instance of a Camera with QT and display it in the window. So far so good, the problem is that when I want to display it in another window (Qdialog) I… 
- 
		5 votes1 answer354 viewsQt calling method in another classI’m calling a method another class after entering data. But it is returning an Sqlite error: QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is still in use, all queries… 
- 
		5 votes1 answer938 viewsHow to create buttons next and back QUI Pyqt4Hello, I’m new to Pyqt and I have a question, I need to create a program with several steps, or screens, where the user will do his due processing on each screen and clicking 'forward' to the next… 
- 
		5 votes0 answers116 viewsHow to print an existing PDF using Poppler (Qt5)?I’m using Poppler for Qt5, but I’ve reviewed the API documentation https://people.freedesktop.org/~aacid/Docs/Qt5/ to read existing PDF documents, I need to put the functionality to send to printer,… 
- 
		4 votes2 answers144 viewsHow to make a constructor equal to Qobject?When a new question arises from an old question, I want to know how to create a class equal to QObject. Basically, I want to know: How to make a copy constructor that does not accept "assignment… 
- 
		4 votes1 answer1144 viewsResize components when enlarging windowHow can I resize the components inside the QWidget when enlarging the window? Example of how it looks:… 
- 
		4 votes2 answers461 viewsQMYSQL driver not Loaded QtcreatorI am trying to connect to the database with Qtcreator as follows: this->db = QSqlDatabase::addDatabase("QMYSQL"); this->db.setHostName("localhost"); this->db.setDatabaseName("Pessoa");… 
- 
		4 votes1 answer87 viewsQvector to QimageI have to turn one QVector 2d in a QImage to display the image on a label. The QVector in the case of an array of integers with a value of 0 to 255 representing an image in PGM or PPM, this vector… 
- 
		4 votes1 answer81 viewsQsharedpointer Definition and FunctionFrom what I understand, the Qsharedpointer is a smart Pointer, ie, a pointer that offers automatic garbage collection. If possible I would like a code that better explains this, including when I… 
- 
		4 votes3 answers880 viewsInteger for StringIn QT Creator 5, how do I convert Integer to string? In Visual Studio 2012 there was the command: std::to_string(10); But it doesn’t work on QT. I tried to: #include <QCoreApplication>… 
- 
		4 votes1 answer213 viewsRepaint screen every little time without crashing - C++I have the following situation: I have to repaint the screen every little while so that objects on the screen move on their own, but this has to occur so that the program does not lock. I tried to… 
- 
		4 votes1 answer151 viewsQt String Encoding ProblemI’m having a problem encoding strings on Qt. By showing something in a QMessageBox or give a drawText in a paintEvent, my strings come out badly formatted, as if they were not in the correct… 
- 
		4 votes3 answers1952 viewsHow to get a text from a Qlineedit in Qt?For example, I have a LineEdit, when I press a button I want to pick up what I wrote on this LineEdit and store a QString. 
- 
		4 votes1 answer2088 viewsHow to convert int to Qstring?I started learning Toolkit today QT and in trying to perform a small test I came across a question: How to convert a whole to QString? Is there a function that receives an integer and returns an… 
- 
		4 votes1 answer168 viewsHow to extend the length of Widgets within a Qscrollarea?I’m looking to build a question form in Qt. As there are several questions to be answered, it is necessary to allow the scrolling of the form, and so I used a QScrollArea. Questions are all answered… 
- 
		4 votes1 answer91 viewsfind_package failed to generate project (in Qt) with CmakeI’m trying to generate the build configuration of a simple Qt example using Cmake. The code of the example is this: #include <QApplication> #include <QTextEdit> int main(int argc, char**… 
- 
		4 votes1 answer68 viewsProblems to remove vector nodeI have two classes: class CAlbum { private: QString Nome; /**< Nome do Álbum */ QString Descricao; /**< Descrição do Álbum */ QString Diretoria; /**< Diretoria onde se encontra o Álbum */… 
- 
		4 votes1 answer560 viewsC++ - Sort particular points of a rectangle in a vector?I have a project in c++ where I should map regions of an image using the mouse click. The point is that I should get the mapping points in a specific storage order, as in the image below: my problem… 
- 
		4 votes3 answers220 viewsAttributeerror: 'Qstring' Object has no attribute 'strip'I’m making a small application in Pyqt4 to understand how it works. In a certain part, I’m using a callback function to display in a QLabel the text that is typed in QtextEdit. This text should be… 
- 
		4 votes2 answers78 viewsDynamic/stochastic object allocation in QMLI am currently trying to do the following in QML, simultaneously: do dynamic loading of Objects previously created a separate file; by doing what is described above, select objects stochastically… 
- 
		3 votes1 answer203 viewsHow to treat screen orientation in QML?I usually develop focused to vertical orientation, but when I turn the device screen to horizontal, the elements are resized in an unwanted way, leaving some smaller than they really should be. For… 
- 
		3 votes1 answer4156 viewsCommand to exit the scope of a function (`break`equivalent)How can I create an algorithm in C++ (using Qt) to abort code processing? I have to validate many different entries and I don’t want to keep creating if else if else. The code is ugly. Example, but… 
- 
		3 votes1 answer171 viewsPrint Tableview Data with QprinterHow can I get the data from a TableView add to layout html and print with QPrinter? Code: QString html; html = "<div>Titulo</div>" "<div>etc</div>"… 
- 
		3 votes1 answer70 viewsFilter month on QsqltablemodelHow do I filter the month on QSqlTableModel? I’m doing like this: model = new QSqlTableModel(this); model->setTable("tabela"); // db sqlite model->setFilter("strftime('%m',… 
- 
		3 votes2 answers155 viewsConvert Qvector<Qstring> to int in C++I have a Qvector and I want to convert it so I can make comparisons to find out which one is bigger. I tried to do this but it doesn’t work: QVector<QString> vector; std::atoi(vector.value… 
- 
		3 votes1 answer857 viewsHow to make a window transparent using Qt?I’m developing a college job in Qt. I would like to make the background of my application transparent. I did some research and the function I found was: this->setWindowOpacity(0); Meanwhile, the… 
- 
		3 votes1 answer196 viewsHow to use Qvector<Qvector <double> as matrix?In the mainwindow.h have: private: QVector<QVector<double> > numbers; //Variável que será minha matriz public slot: void realizar_calcs(QVector<QVector<double> >… 
- 
		3 votes2 answers1327 viewsQmake - Independent executableHow do I compile a Qt Creator program(.pro) with "static link"? I compiled by QT Creator, but I need to copy about 6 dlls to the executable folder, some of them are more than 100mb. I read in the… 
- 
		3 votes1 answer103 viewsHow to install Qt for MSVC without the Microsoft IDE?You can install Qt and the MSVC compiler without installing the Microsoft IDE? I downloaded this version of Qt 5.4.0 for Windows 32-bit (VS 2013, Opengl, 694 MB) and installed, but I do not have… 
- 
		3 votes1 answer534 viewsHow to call a Python script in a C++ code in Qt Creator?How do I call a Python script in a C++ code in Qt Creator? 
- 
		3 votes1 answer73 viewsQt return during releaseWhen I compile my project as debug, it works normally, but when I try to compile in release appears the following message in the Output Compile: cc1plus: error: argument to '-O' should be a… 
- 
		3 votes2 answers1296 viewsHow to get operating system time in nanoseconds or milliseconds using Qt Creator?How can I get system time in nanoseconds or milliseconds in C++ using the Qt Creator? For example, in Java use: long tempoInicial = System.nanoTime(); treinaRNAEpocas(10000); long tempoFinal =…