hi all
i was wondering how i'd go about launching my wizard from the file menu of the mainwindow using the New action in the file menu, so that when i click the New action the wizard is successfully launched.
here's a snapshot of the main.cpp file
#include <QApplication>
#include <QTranslator>
#include <QLocale>
#include <QLibraryInfo>
#include "SkoolCalcWizard.h"
#include "mainwindow.h"
int main(int argc, char *argv[])
{
#ifndef QT_NO_TRANSLATION
translatorFileName
+= QLocale::system().
name();
app.installTranslator(translator);
#endif
MainWindow window;
window.show();
return app.exec();
#include <QApplication>
#include <QTranslator>
#include <QLocale>
#include <QLibraryInfo>
#include "SkoolCalcWizard.h"
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
#ifndef QT_NO_TRANSLATION
QString translatorFileName = QLatin1String("qt_");
translatorFileName += QLocale::system().name();
QTranslator *translator = new QTranslator(&app);
if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
app.installTranslator(translator);
#endif
MainWindow window;
window.show();
return app.exec();
To copy to clipboard, switch view to plain text mode
And here's the part of the mainwindow where i've tried defining the newFile() action to suit my needs
void MainWindow::newFile()
{
SkoolCalcWizard *wizard = new SkoolCalcWizard;
return wizard->exec();
}
void MainWindow::createActions()
{
newAct
= new QAction(tr
("&New"),
this);
newAct->setStatusTip(tr("Create a new file"));
connect(newAct, SIGNAL(triggered()), this, SLOT(newFile()));
}
void MainWindow::newFile()
{
SkoolCalcWizard *wizard = new SkoolCalcWizard;
return wizard->exec();
}
void MainWindow::createActions()
{
newAct = new QAction(tr("&New"), this);
newAct->setShortcuts(QKeySequence::New);
newAct->setStatusTip(tr("Create a new file"));
connect(newAct, SIGNAL(triggered()), this, SLOT(newFile()));
}
To copy to clipboard, switch view to plain text mode
your help will be much appreciated, thanks in advance!!!!! 
Bookmarks