I think so, because the program worked well before (adding new rows in the database).

The Ligas object is a MainWindow. This is ligas.h:
Qt Code:
  1. #ifndef LIGAS_H
  2. #define LIGAS_H
  3.  
  4. #include <QMainWindow>
  5. #include <QtSql>
  6.  
  7. namespace Ui {
  8. class Ligas;
  9. }
  10.  
  11. class Ligas : public QMainWindow
  12. {
  13. Q_OBJECT
  14.  
  15. public:
  16. explicit Ligas(QWidget *parent = 0);
  17. ~Ligas();
  18.  
  19. public slots:
  20. void SetId(const QString,QSqlDatabase *);
  21.  
  22. private:
  23. Ui::Ligas *ui;
  24. };
  25.  
  26. #endif // LIGAS_H
To copy to clipboard, switch view to plain text mode 

And this is ligas.cpp:

Qt Code:
  1. #include "ligas.h"
  2. #include "mainwindow.h"
  3. #include "ui_ligas.h"
  4.  
  5. Ligas::Ligas(QWidget *parent) :
  6. QMainWindow(parent),
  7. ui(new Ui::Ligas)
  8. {
  9. ui->setupUi(this);
  10. }
  11.  
  12. Ligas::~Ligas()
  13. {
  14. delete ui;
  15. }
  16.  
  17. void Ligas::SetId(const QString s,QSqlDatabase *datos)
  18. {...}
To copy to clipboard, switch view to plain text mode