Skip to content

Commit e30f13d

Browse files
author
Tich
committed
add Bilibili Kit 1.0 code
1 parent 43d9962 commit e30f13d

File tree

5 files changed

+7786
-0
lines changed

5 files changed

+7786
-0
lines changed

bilibili-kit/main.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
# @Date : 2018-05-29 11:14:46
4+
# @Author : Lewis Tian ([email protected] | [email protected])
5+
# @Link : https://lewistian.github.io/
6+
# @Version : Python3.5
7+
8+
from PyQt5 import QtWidgets
9+
from PyQt5 import QtCore
10+
from PyQt5.QtWidgets import QWidget, QApplication
11+
from mwin import Ui_MWin
12+
import sys
13+
14+
class MWin(Ui_MWin):
15+
def __init__(self, parent=None):
16+
super(MWin, self).__init__()
17+
18+
if __name__ == '__main__':
19+
app = QApplication(sys.argv)
20+
base = QWidget() # 创建基本窗口
21+
try:
22+
with open('style.qss') as f:
23+
style = f.read() # 读取样式表
24+
base.setStyleSheet(style)
25+
except:
26+
print("open stylesheet error")
27+
w = MWin() # 创建用户界面类的实例
28+
w.setupUi(base) # 将用户界面加载到基本窗口
29+
base.show() # 显示基本窗口,这样基于基本窗口的内容我们都可以看到了
30+
sys.exit(app.exec_())

0 commit comments

Comments
 (0)