QString Qstr1 = ui.usrLineEdit->text();
QString Qstr2 = ui.pwdLineEdit->text();

char *acsUserName = new char[ Qstr1.length() + 1 ]; // + 1 for zero in the end of string
memcpy( acsUserName, Qstr1.toUtf8().constData(),Qstr1.length() + 1 );
char *acsPassword = new char[ Qstr2.length() + 1 ]; // + 1 for zero in the end of string
memcpy( acsPassword, Qstr2.toUtf8().constData(), Qstr2.length() + 1 );

this compiles but my code still isn't working properly. I'm kind of annoyed because I can not create breakpoints in Visual Studios when using QT. It makes it difficult to problem solve but I know its not executing properly because I am checking the number of rows returned from my query is not greater than zero


Qt Code:
  1. if (res.num_rows() > 0)
  2. {
  3. qApp->exit(0);
  4. //goodlogin
  5. }
  6. else
  7. {
  8. //badlogin
  9. }
To copy to clipboard, switch view to plain text mode