You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, November 28th 2016, 6:45pm

qt comboBox issues

hi every one here
somebody should kindly help, i use a QT version 5.1.1 and i have been trying to use the comboBox to load a content of qstqlite databe base but
it has been returning this error message

/home/banye/Desktop/Q-T/build-intense-Desktop_Qt_5_1_1_GCC_32bit-Debug/moc_intense2.cpp:96: error: undefined reference to `intense2::on_comboBox_activated(QString const&)'. this has frustrated me.
this is my source code
void intense2::on_pushButton_loadTB_clicked()
{
intense ins;
ins.connopen();
QSqlQuery *myqry = new QSqlQuery(ins.mydb);
myqry->prepare("select eid,surname,name from qtlogin ");
myqry->exec();


QSqlQueryModel *model = new QSqlQueryModel();
model->setQuery(*myqry);
ui->tableView->setModel(model);
ins.connclose();
qDebug()<<(model->rowCount());

}

void intense2::on_pushButton_list_clicked()
{
intense ins;
ins.connopen();
QSqlQuery *myqry = new QSqlQuery(ins.mydb);
myqry->prepare("select surname from qtlogin ");
myqry->exec();

QSqlQueryModel *model = new QSqlQueryModel();
model->setQuery(*myqry);
ui->comboBox->setModel(model);
ins.connclose();
qDebug()<<(model->rowCount());
}
I will be looking forward for a help thanks