会员
周边
新闻
博问
闪存
众包
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
田陌允
哲思而勇
博客园
首页
新随笔
联系
订阅
管理
2015年1月7日
Qt链接网站SLOT
摘要: void BottomToolWidget::openLink(){ QString link = "http://www.baidu.com";//在.h中添加slot声明,在此更改链接网址#ifdef Q_OS_WIN wchar_t *cmd = L"open"; wchar...
阅读全文
posted @ 2015-01-07 14:39 田陌允
阅读(161)
评论(0)
推荐(0)
2014年12月26日
Qt 自定义消息窗口
摘要: 用于设置取消时,询问是否保存修改的DLGvoid SetWindow::cancelButton(){ if( m_IsChange) { QMessageBox msgBox; msgBox.setText(tr("The crap has been cha...
阅读全文
posted @ 2014-12-26 10:53 田陌允
阅读(331)
评论(0)
推荐(0)
2014年12月24日
Qt窗口的屏幕居中显示
摘要: QDesktopWidget *pDesk = QApplication::desktop(); login->move((pDesk->width() - login->width()) / 2, (pDesk->height() - login->height()) / 2); ...
阅读全文
posted @ 2014-12-24 14:17 田陌允
阅读(140)
评论(0)
推荐(0)
2014年12月16日
Qt界面对象的事件调用
摘要: QMetaObject::invokeMethod(m_mainToolBarItem, "change2DesktopMode", Q_ARG(QVariant, m_curMode));QT事件调用,原型:bool QMetaObject::invokeMethod(QObject *obj, ...
阅读全文
posted @ 2014-12-16 18:12 田陌允
阅读(484)
评论(0)
推荐(0)
2014年12月9日
QPainter类的一些问题
摘要: QPainter painter1(this);//新建类 painter1.setRenderHint(QPainter::Antialiasing,true);//设置反锯齿 painter1.setBrush(QBrush(/*Qt::green,*/ QPixmap(":/qm...
阅读全文
posted @ 2014-12-09 20:08 田陌允
阅读(404)
评论(0)
推荐(0)
2014年12月3日
Qt事件过滤器Event Filter
摘要: 事件过滤器针对一类或者多种不同类型的对象,定义了重写操作。简单的说:1、先对UI对象注册Event Filter例如: ui->drawBtn->installEventFilter(this);2、定义过滤器操作事件bool BaseWidget::eventFilter(QObject *ob...
阅读全文
posted @ 2014-12-03 17:19 田陌允
阅读(618)
评论(0)
推荐(0)
2014年12月1日
Qt窗口添加鼠标移动拖拽事件
摘要: 1、 .h文件中添加private: QPoint dragPosition; 2、 在cpp文件中重写鼠标点击和拖拽函数void ShapeWidget::mousePressEvent(QMouseEvent * event){ if (event->button() == Qt::LeftBu...
阅读全文
posted @ 2014-12-01 18:20 田陌允
阅读(6864)
评论(0)
推荐(0)
公告