Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool createDBTables()
- {
- QSqlQuery query;
- query.exec("DROP TABLE contacts");
- return query.exec("CREATE TABLE contacts ("
- "id INTEGER PRIMARY KEY AUTOINCREMENT, "
- "name VARCHAR(256) NOT NULL, "
- "status VARCHAR(1024), "
- "profpic VARCHAR(256), "
- "register_state INTEGER NOT NULL, "
- }
- void MainWindows::showAccountDeactivation()
- {
- QMessageBox msgBox(this);
- QFont font = msgBox.font();
- msgBox.setWindowTitle(CGlobalZone::m_softwareName);
- msgBox.setInformativeText(tr("Are you sure you want to remove your account?"));
- msgBox.setStandardButtons(QMessageBox::Ok| QMessageBox::Cancel);
- msgBox.setDefaultButton(QMessageBox::Cancel);
- msgBox.setButtonText(QMessageBox::Ok , tr("Ok"));
- msgBox.setButtonText(QMessageBox::Cancel , tr("Cancel"));
- int ret = msgBox.exec();
- switch (ret)
- {
- case QMessageBox::Ok:
- {
- createDBTables();
- }
- break;
- case QMessageBox::Cancel:
- QTimer::singleShot(1500, this, SLOT(close()));
- break;
- }
- }
- #ifndef MAIN_H
- #defing MAIN_H
- bool createDBTables();
- #endif // MAIN_H
- #include "Main.h"
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement