Doc: Compile textdocument-tables snippets
Minor code cleanup in passing. Task-number: QTBUG-81486 Change-Id: I23f8b3a22f627050582c69c81e5e0b85b5e45768 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>bb10
parent
e81383eb09
commit
b16b7d8879
|
|
@ -23,5 +23,6 @@ contains(QT_BUILD_PARTS, tests) {
|
|||
textdocument-lists \
|
||||
textdocument-printing \
|
||||
textdocument-resources \
|
||||
textdocument-selections
|
||||
textdocument-selections \
|
||||
textdocument-tables
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,11 +47,10 @@
|
|||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtGui>
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
|
|
|
|||
|
|
@ -131,9 +131,9 @@ MainWindow::MainWindow()
|
|||
}
|
||||
//! [8]
|
||||
|
||||
connect(saveAction, &QAction:triggered, this, &MainWindow::saveFile);
|
||||
connect(quitAction, &QAction:triggered, this, &MainWindow::close);
|
||||
connect(showTableAction, &QAction:triggered, this, &MainWindow::showTable);
|
||||
connect(saveAction, &QAction::triggered, this, &MainWindow::saveFile);
|
||||
connect(quitAction, &QAction::triggered, this, &MainWindow::close);
|
||||
connect(showTableAction, &QAction::triggered, this, &MainWindow::showTable);
|
||||
|
||||
setCentralWidget(editor);
|
||||
setWindowTitle(tr("Text Document Tables"));
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@
|
|||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef WINDOW_H
|
||||
#define WINDOW_H
|
||||
|
||||
|
|
@ -69,7 +68,7 @@ public slots:
|
|||
private:
|
||||
bool writeXml(const QString &fileName);
|
||||
|
||||
QTextEdit *editor;
|
||||
QTextEdit *editor = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
SOURCES = main.cpp \
|
||||
mainwindow.cpp
|
||||
HEADERS = mainwindow.h
|
||||
TEMPLATE = lib
|
||||
TARGET = textdocument-tables_snippets
|
||||
QT += core gui widgets
|
||||
|
||||
HEADERS = \
|
||||
mainwindow.h
|
||||
|
||||
SOURCES = \
|
||||
main.cpp \
|
||||
mainwindow.cpp
|
||||
|
|
|
|||
Loading…
Reference in New Issue