waynew
17th October 2009, 01:20
I should be able to see why this is happening, but then again, I'm a newbie.
Compiler says 'actionQuit' was not declared in this scope.
Here is part of the mainwindow.cpp:
#include <QtGui>
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindow)
{
ui->setupUi(this);
setupActions();
mStatLabel = new QLabel;
statusBar()->addPermanentWidget(mStatLabel);
connect(textEdit, SIGNAL(textChanged()), this, SLOT(updateStats()));
updateStats();
}
void MainWindow::setupActions()
{
connect(actionQuit, SIGNAL(triggered(bool)),
qApp, SLOT(quit()));
I have checked to be sure the menu item is indeed actionQuit.
So what am I missing?
Compiler says 'actionQuit' was not declared in this scope.
Here is part of the mainwindow.cpp:
#include <QtGui>
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindow)
{
ui->setupUi(this);
setupActions();
mStatLabel = new QLabel;
statusBar()->addPermanentWidget(mStatLabel);
connect(textEdit, SIGNAL(textChanged()), this, SLOT(updateStats()));
updateStats();
}
void MainWindow::setupActions()
{
connect(actionQuit, SIGNAL(triggered(bool)),
qApp, SLOT(quit()));
I have checked to be sure the menu item is indeed actionQuit.
So what am I missing?