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:
#ifndef LIGAS_H
#define LIGAS_H
#include <QMainWindow>
#include <QtSql>
namespace Ui {
class Ligas;
}
{
Q_OBJECT
public:
explicit Ligas
(QWidget *parent
= 0);
~Ligas();
public slots:
private:
Ui::Ligas *ui;
};
#endif // LIGAS_H
#ifndef LIGAS_H
#define LIGAS_H
#include <QMainWindow>
#include <QtSql>
namespace Ui {
class Ligas;
}
class Ligas : public QMainWindow
{
Q_OBJECT
public:
explicit Ligas(QWidget *parent = 0);
~Ligas();
public slots:
void SetId(const QString,QSqlDatabase *);
private:
Ui::Ligas *ui;
};
#endif // LIGAS_H
To copy to clipboard, switch view to plain text mode
And this is ligas.cpp:
#include "ligas.h"
#include "mainwindow.h"
#include "ui_ligas.h"
ui(new Ui::Ligas)
{
ui->setupUi(this);
}
Ligas::~Ligas()
{
delete ui;
}
{...}
#include "ligas.h"
#include "mainwindow.h"
#include "ui_ligas.h"
Ligas::Ligas(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::Ligas)
{
ui->setupUi(this);
}
Ligas::~Ligas()
{
delete ui;
}
void Ligas::SetId(const QString s,QSqlDatabase *datos)
{...}
To copy to clipboard, switch view to plain text mode
Bookmarks