Thanks!
That what I'm saing!
Allmost
I'ld like to excecute any query, so I've:
model = new EditableSqlModel;
model->setQuery("SELECT ID_t, ID_podmiot, ID_oddzial, Numer, Numer_zleceniodawcy FROM m_transporty LIMIT 0 , 30");
model = new EditableSqlModel;
model->setQuery("SELECT ID_t, ID_podmiot, ID_oddzial, Numer, Numer_zleceniodawcy FROM m_transporty LIMIT 0 , 30");
To copy to clipboard, switch view to plain text mode
but in example there is:
void EditableSqlModel::refresh()
{
setQuery("select * from person");
setHeaderData
(0, Qt
::Horizontal,
QObject::tr("ID"));
setHeaderData
(1, Qt
::Horizontal,
QObject::tr("First name"));
setHeaderData
(2, Qt
::Horizontal,
QObject::tr("Last name"));
}
void EditableSqlModel::refresh()
{
setQuery("select * from person");
setHeaderData(0, Qt::Horizontal, QObject::tr("ID"));
setHeaderData(1, Qt::Horizontal, QObject::tr("First name"));
setHeaderData(2, Qt::Horizontal, QObject::tr("Last name"));
}
To copy to clipboard, switch view to plain text mode
I'd like to change query in setQuery automatyicly. I've tried use to
setQuery(this->query().executedQuery());
setQuery(this->query().executedQuery());
To copy to clipboard, switch view to plain text mode
but it's empty
Bookmarks