zoukankan      html  css  js  c++  java
  • MyQMainWindowDemo

    # coding=utf-8
    from PyQt4.QtGui import *
    from PyQt4.QtCore import *
    from MyQThread import *
    import sys
    from SocketFromServer import SocketFromServer
    import img
    
    class MyQMainWindowDemo(QMainWindow):
        def __init__(self, parent=None):
            super(MyQMainWindowDemo, self).__init__(parent)
            mycode = 'utf-8'
            code = QTextCodec.codecForName(mycode)
            QTextCodec.setCodecForLocale(code)
            QTextCodec.setCodecForTr(code)
            QTextCodec.setCodecForCStrings(code)
            title = ['     事件监控平台
    下面是相应未处理的事件', '事件ID   :', '责任人   :', 'eSpace已通知']
            label_0 = QLabel(title[0])
    
            ft = QFont()
            ft.setPointSize(20)
            ft.setBold(True)
            label_0.setFont(ft)
    
            input_box = QGridLayout()
            Title_Layout = QVBoxLayout()
            Content_Layout = QHBoxLayout()
    
            Title_Layout.addWidget(label_0, alignment=Qt.AlignCenter)
    
            input_box.setColumnStretch(0, 1)
            input_box.setColumnStretch(1, 2)
            input_box.setColumnStretch(2, 1)
    
            self.eSpaceTextEdit = QTextBrowser()
            input_box.addWidget(self.eSpaceTextEdit, 0, 0, 4, 7)
            self.initMenu()
            self.socket = SocketFromServer()
    
            a = QWidget()
            self.thread = MyQThread()
            self.MyThread_30 = MyQThread_30()
    
            self.btnStart = QPushButton('Start')
            h_box = QVBoxLayout()
    
            h_box.addLayout(Title_Layout, 1)
            h_box.addLayout(input_box, 5)
    
            a.setLayout(h_box)
            self.setCentralWidget(a)
            self.resize(QSize(550, 300))
            self.setWindowTitle(u'eSpace监控外呼工具')
            self.row = 1
            self.connect(self.thread, SIGNAL('output(QString)'), self.AutoRefreshData)  # 10S获取新的
            self.connect(self.MyThread_30, SIGNAL('output(QString)'), self.AutoRefreshAndSend)  # 1min更新界面
    
            self.thread.start()
            self.MyThread_30.start()
            self.warning_thread = MyQThread_Warning()
            self.warning_thread.start()
            self.delay_thread = MyQThreadDelay()
            self.setWindowIcon(QIcon(':img/background.ico'))
            self.music_warning_status = 0
            self.lock_delay_status = 0
    
    
            self.setAutoFillBackground(True)
    
        
    
    
    if __name__ == "__main__":
        try:
            app = QApplication(sys.argv)
            myWindow = MyQMainWindowDemo()
            myWindow.show()
            sys.exit(app.exec_())
        except Exception, e:
            print e
    
    
    
  • 相关阅读:
    JS document.execCommand实现复制功能(带你出坑)
    jquery动态添加删除一行数据示例
    SpringBoot SpEL表达式注入漏洞-分析与复现
    Fastjson 1.2.22-24 反序列化漏洞分析
    udf提权原理详解
    ZZCMS v8.2 前台Insert注入+任意文件删除
    安恒杯 3月线上个人赛WriteUp
    SQLI LABS Stacked Part(38-53) WriteUp
    【转】Ubuntu16.04安装docker
    安装部署k8s-版本-1.13
  • 原文地址:https://www.cnblogs.com/jian-pan/p/6934846.html
Copyright © 2011-2022 走看看