import sys from PyQt4 import QtCore, QtGui class myWidget(QtGui.QWidget): def __init__(self): super(myWidget, self).__init__() self.setWindowTitle("te... ...
分类:
其他好文 时间:
2017-09-23 12:27:40
阅读次数:
193
#include "mainwindow.h" #include <QApplication> #include <QLabel> #include <QPushButton> #include <QtCore/QCoreApplication> #include <QCoreApplication ...
分类:
数据库 时间:
2017-09-22 12:07:00
阅读次数:
231
在Qt中,我们不可避免的会用到QLabel类。而Qlabel的强大功能作为程序员的你有多少了解? 下面,跟着我一起在来学习一下吧! 1、添加文本 Qlabel类添加文本有两种方式,一种是直接在实现时添加,如: 一种是在实现后添加,如: 2、设置尺寸,位置 设置尺寸也有多种,常用的固定尺寸(Fixed ...
分类:
其他好文 时间:
2017-07-14 16:34:28
阅读次数:
217
当你接触到Qt时,你会为它极为方便的跨平台方面感到吃惊,从而想尝试着使用Qt。渐渐地你会发现Qt自带的一些控件不能满足自己的需要,此时就需要我们自己定义一个属于自己的控件。总所周知,标签的风格设置类比较多,但默认的标签没有鼠标响应事件。 今天,给大家带来的是:标签按钮类。从名字就可以看出,将标签修改 ...
分类:
其他好文 时间:
2017-06-12 13:10:38
阅读次数:
195
class login_window : public QWidget { Q_OBJECT protected: bool eventFilter(QObject * watched, QEvent * event); } bool login_window::eventFilter(QObjec... ...
分类:
其他好文 时间:
2017-04-22 01:04:21
阅读次数:
207
fromPyQt5.QtWidgetsimport(QWidget,QTableWidget,QHBoxLayout,QVBoxLayout,QGridLayout,QGroupBox,QLineEdit,QLabel,QPushButton,
QHeaderView,QTableWidgetItem,QMessageBox)
importos,re
#定义站点信息窗口
classstcd_window(QWidget):
def__init__(self):
super().__init__..
fromPyQt5.QtWidgetsimportQWidget,QLineEdit,QLabel,QPushButton,QGridLayout,QHBoxLayout,QGroupBox,QComboBox,QMessageBox
importpickle,smtplib,os
fromemailimportencoders
fromemail.headerimportHeader
fromemail.utilsimportparseaddr,formataddr
fromemail.mime.texti..
fromPyQt5.QtWidgetsimportQWidget,QLabel,QLineEdit,QGroupBox,QGridLayout,QVBoxLayout,QPushButton,QMessageBox
importpickle,pymssql,os,threading,time
#定义数据库窗口
classdb_window(QWidget):
def__init__(self):
super().__init__()
self.db_server=QLineEdit()
self..
分类:
数据库 时间:
2017-04-20 11:43:18
阅读次数:
179
直接附上源码QPixmappixmap("/opt/bin/png/true.png");QSizesz(25,25);pixmap=pixmap.scaled(sz,Qt::KeepAspectRatio);ui->label_8->setPixmap(pixmap);
分类:
其他好文 时间:
2017-02-16 11:53:50
阅读次数:
212
上篇文章我讲解了怎么去安装QT开发环境,下面我们讲解怎么去新建一个工程,工程由哪些结构组成。这里我们回顾一些知识点。我的开发坏境是Ubuntu16.04 TLS ,我们用到的安装包截图如下,一个是QT...
分类:
其他好文 时间:
2016-11-20 23:12:54
阅读次数:
524