位图和矢量图:
Bitmap:
- Usually a larger file size
- Cannot be enlarged into a higher resolution as the image quality will be affected
- Used to display complex images with many colors, such as photographs
Vector:
- Very small in file size
- Graphics can be resized without affecting the image quality
- Only a limited amount of color can be applied to each shape (single color, gradient, or pattern)
- Complex shapes require high-processing power to be generated
新建基于Widget的应用程序,继承于QMainWindow
MainWindow.h
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
#ifndef
MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QPainter> #include <QMenuBar> #include <QtSvg/QSvgGenerator> #include <QFileDialog> class MainWindow : public QMainWindow { Q_OBJECT public : MainWindow(QWidget *parent = 0 ); ~MainWindow(); virtual |