// Help callback function void AViz::distribute() { // Launch a message box MessageBox * mb = new MessageBox(SHORT_DISTRIBUTE_STRING, this); mb->show(); // Print the full distribution conditions printf("%s\n", DISTRIBUTE_STRING ); }
// Help callback function void AViz::license() { // Launch a message box MessageBox *mb = new MessageBox(SHORT_LICENSE_STRING, this); mb->show(); // Print the full license conditions printf("%s\n", LICENSE_STRING ); printf("%s\n", DISTRIBUTE_STRING ); }
int main(int argc, char *argv[]) { QApplication a(argc, argv); MessageBox newMessage; newMessage.show(); return a.exec(); }
int main(int argc, char * argv[]) { QApplication app(argc,argv); QFont f("ZYSong18030",12); QApplication::setFont(f); QTranslator translator; translator.load("messagebox_zh"); app.installTranslator(&translator); MessageBox msg; msg.show(); return app.exec(); }
void MainWindow::ShowAsks(User frd) { QMessageBox::StandardButton reply; reply = QMessageBox::question(this, "Someone want to talk to you", frd.name + " want to talk to you, agree?", QMessageBox::Yes | QMessageBox::No); if (reply == QMessageBox::Yes) { server->OkToTalk(frd); MessageBox* mb = new MessageBox(); connect( mb,SIGNAL( MsgBoxClosed(int) ),this,SLOT( DeleteMsgBox(int) ) ); int port = mb->BindPort(); users.data[ 0 ].port = port; frd.mid = mbs.size(); users.Add(frd);//update mb->Init(users.data[ 0 ],frd); mbs.append(mb); mb->show(); }
void ErrorMachine::messageBox(QString m) { MessageBox * mb = new MessageBox(m); mb->show(); }
// Help callback function void AViz::about() { // Launch a message box MessageBox *mb = new MessageBox(aviz::Version::getVersionInfo(), this); mb->show(); }