您的位置:首页 > 编程语言 > Qt开发

QT 50种常用标准对象

2015-08-20 10:59 666 查看
常见的50 种 QT Object,下面按alpha排序, 有非默认构造的简单示例。

它们的属性设置也有通用性。有不同的外观,有不同的属性行为.不同的用途.

掌握他们是编程的基础. 可以参考<<Qt4 精彩编程实例分析>>源代码

QAction

QActionGroup

QCheckBox

QComboBox

QCursor

QDateTime

QDateTimeEdit

QDialog

QDialogButtonBox

QDockWidget

QFile

QFontComboBox

QFrame

QGraphicsEllipseItem

QGraphicsItemAnimation

QGraphicsPolygonItem

QGraphicsRectItem

QGraphicsScene

QGraphicsTextItem

QGraphicsView

QGridLayout

QGroupBox

QHBoxLayout

QImage

QLabel

QLineEdit

QListView

QListWidget

QListWidgetItem

QMainWindow

QPainter

QPixmap

QProgressBar

QProgressDialog

QPushButton

QRadioButton

QSlider

QSpinBox

QSplitter

QStackedWidget

QStandardItemModel

QTabWidget

QTableView

QTableWidget

QTableWidgetItem

QTextEdit

QTimeLine

QTimer

QToolButton

QVBoxLayout

QWidget

new QAction(QIcon(":/images/copy.png"), tr("Copy"), this);

new QAction(QIcon(":/images/zoomin.png"),tr("ZoomIn"),this);

new QAction(tr("Add Polygon"),this);

new QCheckBox(tr("receive msg"));

new QCursor(QPixmap(":/images/custom.png"),-1,-1);

new QDialogButtonBox(Qt::Vertical);

new QDockWidget( tr("DockWindow 2"), this );

new QFile(fileName);

new QFontComboBox(toolBar);

new QGraphicsEllipseItem(QRectF(0,0,80,60));

new QGraphicsPolygonItem(QPolygonF(v));

new QGraphicsRectItem(QRectF(0,0,60,60));

new QGraphicsTextItem("Hello Qt");

new QGroupBox(tr("Rotate"));

new QImage(":/images/heart.png");

new QLabel(tr("width:"));

new QListWidget(splitterMain);

new QListWidgetItem (icon,fileName);

new QPainter(pix);

new QPixmap(":/images/rotate.png");

new QPixmap(size());

new QPixmap(width,height);

new QPushButton(tr("pushbutton"));

new QRadioButton(tr("radiobutton1"),group);

new QSlider(Qt::Horizontal);

new QSplitter(Qt::Horizontal,0);

new QSplitter(Qt::Vertical,splitterMain);

new QStandardItemModel(4,4,this);

new QTableWidgetItem(tr("Alice"));

new QTextEdit( QObject::tr("Top Widget"),splitterRight);

new QTimeLine(4000);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: