Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // add the following includes.
- #include <QInputDialog>
- #include <QDir>
- #include <QFileDialog>
- #include <QColorDialog>
- #include <QMessageBox>
- MainWindow::MainWindow(QWidget *parent) :
- QMainWindow(parent),
- ui(new Ui::MainWindow)
- {
- ui->setupUi(this);
- scribbleArea = new ScribbleArea;
- //ui->centralWidget(scriblearea);
- setCentralWidget(scribbleArea);
- //ui->MainWindow::
- createActions();
- createMenus();
- setWindowTitle("scribble");
- resize(500,500);
- }
- Paint_App/mainwindow.cpp:20: error: 'scribbleArea' was not declared in this scope
- scribbleArea = new ScribbleArea;
- ^
- Paint_App/mainwindow.cpp:49: error: 'scribbleArea' was not declared in this scope
- scribbleArea->openImage(fileName);
- ^
- // void MainWindow::penColor(){
- Paint_App/mainwindow.cpp:61: error: 'scribbleArea' was not declared in this scope
- QColor newColor = QColorDialog::getColor(scribbleArea->penColor());
- ^
- // void MainWindow::penWidth(){
- Paint_App/mainwindow.cpp:72: error: 'scribbleArea' was not declared in this scope
- scribbleArea->penWidth(),
- ^
- // foreach (QByteArray format, QImageWriter::supportedImageFormats())
- Paint_App/mainwindow.cpp:96: error: incomplete type 'QImageWriter' used in nested name specifier
- foreach (QByteArray format, QImageWriter::supportedImageFormats()) {
- ^
- // connect(printAct, SIGNAL(triggered()), scribbleArea, SLOT(print()));
- Paint_App/mainwindow.cpp:112: error: 'scribbleArea' was not declared in this scope
- connect(printAct, SIGNAL(triggered()), scribbleArea, SLOT(print()));
- // bool MainWindow::saveFile(const QByteArray &fileFormat) ^
- Paint_App/mainwindow.cpp:210: error: 'scribbleArea' was not declared in this scope
- return scribbleArea->saveImage(fileName, fileFormat.constData());
- ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement