Questions tagged as 'qt'

2
answers

How to use Qt translations directly with QApplication :: tr ()

In an application developed in Qt I have a non-visual class (that is, it is not inherited from a QWidget ) but it handles text strings that must be presented to the user. To use the Qt translation engine, I defined all strings using the...
asked by 11.12.2013 / 18:59
1
answer

Waiting for a signal inside a QQuickImageProvider

I'm creating an application using QML and Qt 5.2 . In it a ListView displays multiple items, each with an image and associated text. The image is built based on data uploaded from a server by HTTP . In a simplified way, I have the fol...
asked by 23.01.2014 / 15:12
2
answers

Format decimal with comma and thousand with dot

How can I format a float into the Brazilian value (price) format? Example: in php number_format($float,2,',','.') separates the decimal with comma and the unit of thousand with point.     
asked by 19.03.2014 / 17:59
1
answer

Difficulties with selecting items in a QTreeView

Scenario: I have an application that manages a list of images of human faces with prototypical emotional expressions. I've created a class inherited from QAbstractListModel to provide the data access model (model), and I'm using two...
asked by 04.03.2015 / 04:35
1
answer

QVideoWidget does not display anything

I'm trying to use the QMediaPlayer and QVideoWidget to display a video on a system I'm producing. Except that these class rays do not work as expected. QVideoWidget simply does not appear, does not display the video, do...
asked by 23.06.2016 / 01:06
2
answers

How to check for collision between particles?

I need to know how to make each circle collide with the other along with what I'm going to do to follow that direction after that collision. This is the program's main window class: class canvas : public QWidget { Q_OBJECT public: e...
asked by 26.04.2014 / 01:42
1
answer

Optimize collision between particles

I need to optimize to the maximum the algorithm that makes the collision between the particles, is there anything that can be done for this? And I also want to add a background image, is it possible? Follow the code canvas.cpp: canvas::canv...
asked by 18.05.2014 / 02:00
1
answer

QT + OpenCV on Mac OS 10.10.3 com error: symbol (s) not found for architecture x86_64

I recently installed Qt Creator and OpenCv. I was able to quietly compile the separate QT and OpenCv. But I can not compile them together. My .pro file looks like this: #------------------------------------------------- # # Project crea...
asked by 27.06.2015 / 19:27
1
answer

How does the class constructor declaration in Qt?

Work with C and a little assembly on Atmel AVR microcontrollers. I'm trying to understand how the framework extends C ++. I created a new project with Qt Creator (Widgets), and generated the following code: MainWindow::MainWindow(QWidge...
asked by 08.08.2015 / 22:44
2
answers

What does it mean to create an object with an asterisk? [duplicate]

While learning programming at a reasonable time, learning C ++ with QT, I came across something I had not seen in other languages. I noticed that some (not all) objects need to be created with an asterisk preceding the name. For example: QMe...
asked by 19.06.2015 / 01:07