QT + PyQt + Electron
桌面应用开发(QT + PyQt + Electron)
「已注销」
这个作者很懒,什么都没留下…
展开
-
PyQT5使用Qt Creator创建ui
1、使用Qt Creator创建ui文件2、将ui文件转换为py文件pyuic5 -o mainwindow.py mainwindow.ui3、引用刚才生成的py文件import sysfrom PyQt5.QtWidgets import QApplication, QMainWindowfrom mainwindow import *class MyWindow(QMainWindow, Ui_MainWindow): def __init__(self, pare原创 2022-03-20 14:31:07 · 1212 阅读 · 0 评论 -
Pyhton中bytearray与string相互转换
#按string来显示,byarray代表接收到的数据readstr = byarray.decode('utf-8')#这样就直接转换成str格式 #强制转换readstr = str(byarray)#用这种方式得到的数据会带有b''字符 #将读取的数据按十六进制字符显示,能让我们直接看到最底层的数据格式readstr = ' '.join(hex(x) for x in byarray)#这句能把byarray里的数据遍历一遍转换成hex格式,而且用空格相连...原创 2022-03-18 14:42:51 · 3053 阅读 · 0 评论 -
在Python中打印函数名和行号
def gid_uci_core_group_handler(oid, payload_len, payload): print(sys._getframe().f_code.co_name) print(sys._getframe().f_lineno) pass原创 2022-03-17 23:52:08 · 2510 阅读 · 0 评论 -
Python16进制数组处理
hex_string = "11 22 33 44"hex_data = bytearray.fromhex(hex_string)print(hex_data)print(len(hex_data))def print_hex(bytes): l = [hex(int(i)) for i in bytes] print(" ".join(l))print_hex(hex_data)def print_bytes_hex(data): l = ['%02X' % .原创 2022-03-17 16:53:43 · 1876 阅读 · 0 评论 -
PyQt QSS实例
from PyQt5.QtWidgets import *import sysclass WindowDemo(QWidget): def __init__(self): super().__init__() btn1 = QPushButton(self) btn1.setText('按钮1') btn2 = QPushButton(self) btn2.setProperty('name', 'myBt.原创 2022-03-17 14:12:28 · 289 阅读 · 0 评论 -
PyQT信号与槽
import sysfrom PyQt5.QtCore import Qtfrom PyQt5.QtWidgets import (QWidget, QLCDNumber, QSlider,QGridLayout,QLabel,QHBoxLayout, QGroupBox, QVBoxLayout, QApplication,QProgressBar,QPushButton,QMessageBox) class SignalSlot(QWidget): def __init.原创 2022-03-17 13:27:59 · 267 阅读 · 0 评论 -
PyQT
from PyQt5.Qt import *import sysclass Window(QWidget): def __init__(self): super().__init__() self.setWindowTitle("QLineEdit..") self.resize(500, 400) self.setup_ui() def setup_ui(self): ql_a = QLineEdit(.原创 2022-03-14 00:04:14 · 1139 阅读 · 0 评论 -
nRF Connect: Launcher
nrf Connect Launcher原创 2021-11-28 15:08:15 · 485 阅读 · 0 评论 -
nRF Connect: Programmer
原创 2021-11-27 14:26:57 · 632 阅读 · 0 评论