QSettings seting("ServerBD","Net"); m_process = new QProcess(this); connect(m_process, SIGNAL(readyReadStandardOutput()), SLOT(processout())); m_process->start("cmd /C mysql -u"+seting.value("LoginMySql","root").toString()+" -P"+seting.value("PortMySQL","3306").toString()+" -h"+seting.value("hostMySql").toString()+" -p"+seting.value("PassMySql").toString()); QString s = "CREATE DATABASE IF NOT EXISTS torgbd1 \\g \r\n \\q \r\n"; m_process->write(s.toAscii()); m_process->close(); delete m_process;
bool MainWindow::event(QEvent * m){ if (m->type() == m->WindowStateChange){ if(this->isMinimized()) setHidden(true); minimized = true; } return true;}
bool MainWindow::event(QEvent * m){ if (m->type() == m->WindowStateChange){ if(this->isMinimized()) setHidden(true); } return MainWindow::event(m);}
bool MainWindow::event(QEvent * event){ if (event->type() == event->WindowStateChange){ if(this->isMinimized()) setHidden(true); } return QMainWindow::event(event);}
bool MainWindow::event(QEvent * event){ if (event->type() == event->WindowStateChange){ if(this->isMinimized()) QTimer::singleShot(0, this, SLOT(hide())); } return QMainWindow::event(event);}