Questions tagged as 'qt'

1
answer

Update a TableView

How can I update a TableView after closing a Dialog? Example: main.ccp abre conexão com banco de dados principal::principal(){ //..etc..// model->setTable("nomeTabela"); model->setEditStrategy(QSqlTableModel::OnManualSubmit); m...
asked by 19.03.2014 / 14:08
2
answers

I can not use char '&' Qt Creator

I'm trying to return a QString, which will be used as a URL and need to use '&' as a separator in the URL. However, when the character is placed in the QString, it breaks the URL and what should appear after the '&' does not appear. re...
asked by 07.08.2017 / 15:10
2
answers

QT signal from C ++ to QML

I'm trying with QT 5 + QML to create an application where after opening the file using fileDialog it returns a message by a QT signal. The application opens using a QML and initiates a call to a SLOT in the class responsible. Th...
asked by 16.07.2014 / 23:50
1
answer

How to validate the price on Qt?

I would like to know how to validate the price on Qt, as follows: Examples accepted: 10,00 / 100,00 / 1.000,00 = true My code, (but is validating true: 10 / 100 ) bool ok; QLocale::setDefault(QLocale(Q...
asked by 17.03.2014 / 14:02
1
answer

Error compiling project with QT

Hello, I'm a beginner in qt, I did a C ++ course with QT in 2013 but I was not able to take the apprenticeship forward and now I'm taking over. Now I'm trying to compile a simple project, I just create a new project in qt widget, it automaticall...
asked by 05.07.2016 / 01:32
1
answer

How to use two OpenGL viewports using QT?

I'm trying to do two viewports in qt but I'm not getting success, here's the code below: 1. Method that makes the drawings on the screen: void GLWidget::paintGL() { //Limpa buffer //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BI...
asked by 03.08.2015 / 18:26
1
answer

Multiple Definitions in the moc.o file of a class

I'm having a lot of multiple definitions problems in QT. For common classes, and all classes in our library, the solution was to put the header and implementation in the same .hpp, and it worked. To be able to use the slots and signals, I made t...
asked by 20.04.2014 / 20:12
2
answers

Organization of projects with qMake

I'm developing a project and would like to start separating things into smaller parts and also to be able to test those parts, so by researching I found something about using * .pri files to be able to make a chain of projects and subprojects, b...
asked by 09.08.2017 / 18:21
2
answers

I connect in the database but the values do not change when I give UPDATE MYSQL Qt C ++

The data is loaded into the table, so I change the data in the table, when I click the button to update, I get the data (even the changes) and save it to the variable, but it seems that when I enter the sql query nothing happens . I need to be ab...
asked by 08.06.2017 / 12:51
1
answer

How to use SQLite in Qt 5.7 with Android [closed]

Would you like to know how to communicate with the SQLite database on android using QSqlDatabase ? I have done some tests and for desktop I can communicate with DB, but with android I am not able to make the same communication.     
asked by 20.09.2016 / 17:21