Hello all!
I have an app with a menu bar and a restart process.
When the app is restarted by the process the menu bar disappears.
I am using OSX 10.9
main.cpp
#include "mainwindow.h"
#include <QApplication>
#define CODIGO_RESTART 1000
int main(int argc, char *argv[])
{
int codigoSaida = 0;
do{
MainWindow w;
w.show();
codigoSaida = a.exec();
}while(codigoSaida == CODIGO_RESTART);
return codigoSaida;
}
#include "mainwindow.h"
#include <QApplication>
#define CODIGO_RESTART 1000
int main(int argc, char *argv[])
{
int codigoSaida = 0;
do{
QApplication a(argc, argv);
MainWindow w;
w.show();
codigoSaida = a.exec();
}while(codigoSaida == CODIGO_RESTART);
return codigoSaida;
}
To copy to clipboard, switch view to plain text mode
restart process
void MainWindow::reiniciar()
{
qApp->exit(1000);
}
void MainWindow::reiniciar()
{
qApp->exit(1000);
}
To copy to clipboard, switch view to plain text mode
When I call reiniciar function, the app restarts but the menu bar do not appears
Bookmarks