#-*- coding:utf-8 -*- from PyQt5.QtWidgets import QApplication,QWidget,QTableWidgetItem import sys from form import Ui_Form import random import time ... ...
分类:
其他好文 时间:
2018-02-13 17:51:50
阅读次数:
249
from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * import sys class Example(QWidget): _startPos = None _endPos = None ... ...
分类:
Windows程序 时间:
2018-02-07 14:44:11
阅读次数:
1070
移动相机需要用到键盘按键,按键事件的引入需要包含头文件 #include <Qt3DInput\qkeyevent.h> 并实现QWidget中定义的虚函数keyPressEvent 我们首先在MyGlWindow中重写这个虚函数。 在MyGlWindow.h加入 在MyGlWindow.cpp中定 ...
分类:
移动开发 时间:
2018-02-02 14:30:01
阅读次数:
204
官方文档 doc QWidget QWidget类是所有用户界面对象的基类。 窗口部件是用户界面的一个基本单元:它从窗口系统接收鼠标、键盘和其它事件,并且在屏幕上绘制自己。 每一个窗口部件都是矩形的,并且它们按Z轴顺序排列。 一个窗口部件可以被它的父窗口部件或者它前面的窗口部件盖住一部分。 QSpl ...
分类:
其他好文 时间:
2018-02-01 23:06:52
阅读次数:
186
MainWindow *m;//定义全局 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { m = this; ui->setupUi(this); } void MainW... ...
import sysfrom PyQt5.QtWidgets import (QWidget, QToolTip,QMessageBox, QPushButton, QApplication,QDesktopWidget)from PyQt5.QtGui import QFont,QIconfrom ...
分类:
其他好文 时间:
2018-01-05 19:51:24
阅读次数:
182
最近用Qt软件界面,需要用到mouseMoveEvent,研究了下,发现些问题,分享一下。 在Qt中要捕捉鼠标移动事件需要重写MouseMoveEvent,但是MouseMoveEvent为了不太耗资源在默认状态下是要鼠标按下才能捕捉到。要想鼠标不按下时的移动也能捕捉到,需要setMouseTrac ...
分类:
其他好文 时间:
2017-12-25 15:10:41
阅读次数:
160
版权声明:若无来源注明,Techie亮博客文章均为原创。 转载请以链接形式标明本文标题和地址: 本文标题:Qt富文本编辑器QTextDocument 本文地址:http://techieliang.com/2017/12/726/ 文章目录 1. 介绍 2. 基本使用 2.1. 简单范例 2.2. ...
分类:
其他好文 时间:
2017-12-18 19:00:34
阅读次数:
1782
QWidget::createWindowContainer和QWindow::setParentNative Widgets vs Alien Widgets http://doc.qt.io/qt-5/qwidget.html#native-widgets-vs-alien-widgetsAli ...
分类:
其他好文 时间:
2017-12-15 19:32:48
阅读次数:
152
在QWidget 之paint部分杂记提到了从Qt4.4开始,Alien Widget被引入。那么...这是什么东西呢,我们在使用中又可能会感受到什么东西? 用例子来说话似乎比用源码来说话来得容易,所以看例子: 例子 一个小例子: 创建 a -> b -> c -> d -> e 共5个widget ...
分类:
其他好文 时间:
2017-12-14 21:05:21
阅读次数:
366