2012年9月6日
摘要: We can show a image with automatic scroll bars with the use of QScrollArea.This is a simple application with QScrollArea.#include <QtGui/QApplication>#include <QLabel>#include <QScrollArea>#include "qmlapplicationviewer.h"Q_DECL_EXPORT int main(int argc, char *argv[]){ QA 阅读全文
posted @ 2012-09-06 14:31 Jiang, X. 阅读(1499) 评论(0) 推荐(0) 编辑
摘要: To paint on a device, usually a widget, we need to overload the function void QWidget::paintEvent(QPainteEvent *event){}We also need to construct the object of QPainter in the function of paintEvent like this: QPainter painter(this);Then we will be able to use QPainter whataver we like. 阅读全文
posted @ 2012-09-06 13:48 Jiang, X. 阅读(418) 评论(0) 推荐(0) 编辑
摘要: QWidget::width();QWidget::height(); 阅读全文
posted @ 2012-09-06 13:26 Jiang, X. 阅读(378) 评论(0) 推荐(0) 编辑