附录
文本编辑器代码
textedit.pro
TEMPLATE
= app
TARGET
= textedit
CONFIG
+= qt warn_on
HEADERS
= textedit.h
SOURCES
= textedit.cpp \
main.cpp
RESOURCES += textedit.qrc
build_all:!build_pass {
CONFIG -= build_all
CONFIG += release
}
# install
target.path = $$[QT_INSTALL_DEMOS]/textedit
sources.files
=
$$SOURCES
$$HEADERS
$$RESOURCES
*.pro
*.html
*.doc
images
sources.path = $$[QT_INSTALL_DEMOS]/textedit
INSTALLS += target sources
textedit.h
#ifndef TEXTEDIT_H
#define TEXTEDIT_H
#include
#include
#include
QT_FORW
ARD_DECLARE_CLASS(QAction)
QT_FORW
ARD_DECLARE_CLASS(QComboBox)
QT_FORW
ARD_DECLARE_CLASS(QFontComboBox)
QT_FORW
ARD_DECLARE_CLASS(QTextEdit)