mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-21 18:12:18 +08:00
修改label默认显示
This commit is contained in:
parent
3cf3b3f7c1
commit
e8d6774f5f
@ -79,7 +79,17 @@ class Contact(Person):
|
||||
self.avatar_path = Icon.Default_avatar_path
|
||||
self.is_chatroom = self.wxid.__contains__('@chatroom')
|
||||
self.detail = contact_info.get('detail')
|
||||
self.label_name = contact_info.get('label_name')
|
||||
self.label_name = contact_info.get('label_name') # 联系人的标签分类
|
||||
|
||||
"""
|
||||
detail存储了联系人的详细信息,是个字典
|
||||
{
|
||||
'region': tuple[国家,省份,市], # 地区三元组
|
||||
'signature': str, # 个性签名
|
||||
'telephone': str, # 电话号码,自己写的备注才会显示
|
||||
'gender': int, # 性别 0:未知,1:男,2:女
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
class ContactDefault(Person):
|
||||
|
@ -1,4 +1,4 @@
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtGui import QIcon, QPixmap
|
||||
|
||||
from app.resources import resource_rc
|
||||
|
||||
@ -32,8 +32,10 @@ class Icon:
|
||||
Folder_Icon = QIcon(':/icons/icons/folder.svg')
|
||||
Start_Icon = QIcon(':/icons/icons/start.svg')
|
||||
Decrypt_Icon = QIcon(':/icons/icons/decrypt.svg')
|
||||
Man_Icon = QIcon(':/icons/icons/man.svg')
|
||||
Woman_Icon = QIcon(':/icons/icons/woman.svg')
|
||||
Man_Icon_path = ':/icons/icons/man.svg'
|
||||
Woman_Icon_path = ':/icons/icons/woman.svg'
|
||||
Man_Icon = QIcon(':/icons/icons/man.svg')
|
||||
Woman_Icon = QIcon(':/icons/icons/woman.svg')
|
||||
# Man_Icon_pixmap = QPixmap(Man_Icon_path)
|
||||
# Woman_Icon_pixmap = QPixmap(Woman_Icon_path)
|
||||
# Logo_Icon = QIcon(':/icons/icons/logo.png')
|
||||
|
@ -54,6 +54,7 @@ class Ui_Frame(object):
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.l_gender.sizePolicy().hasHeightForWidth())
|
||||
self.l_gender.setSizePolicy(sizePolicy)
|
||||
self.l_gender.setText("")
|
||||
self.l_gender.setObjectName("l_gender")
|
||||
self.horizontalLayout.addWidget(self.l_gender)
|
||||
self.gridLayout_2.addLayout(self.horizontalLayout, 0, 1, 1, 1)
|
||||
@ -70,6 +71,7 @@ class Ui_Frame(object):
|
||||
self.l_username.setObjectName("l_username")
|
||||
self.gridLayout_2.addWidget(self.l_username, 2, 1, 1, 1)
|
||||
self.l_region = QtWidgets.QLabel(Frame)
|
||||
self.l_region.setText("")
|
||||
self.l_region.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||
self.l_region.setObjectName("l_region")
|
||||
self.gridLayout_2.addWidget(self.l_region, 3, 1, 1, 1)
|
||||
@ -108,6 +110,7 @@ class Ui_Frame(object):
|
||||
self.label_4.setObjectName("label_4")
|
||||
self.gridLayout.addWidget(self.label_4, 1, 0, 1, 1)
|
||||
self.l_tel = QtWidgets.QLabel(Frame)
|
||||
self.l_tel.setText("")
|
||||
self.l_tel.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||
self.l_tel.setObjectName("l_tel")
|
||||
self.gridLayout.addWidget(self.l_tel, 1, 1, 1, 1)
|
||||
@ -120,6 +123,7 @@ class Ui_Frame(object):
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
|
||||
self.l_contact_label = QtWidgets.QLabel(Frame)
|
||||
self.l_contact_label.setText("")
|
||||
self.l_contact_label.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||
self.l_contact_label.setObjectName("l_contact_label")
|
||||
self.gridLayout.addWidget(self.l_contact_label, 2, 1, 1, 1)
|
||||
@ -134,6 +138,7 @@ class Ui_Frame(object):
|
||||
self.l_signature = QtWidgets.QLabel(Frame)
|
||||
self.l_signature.setMinimumSize(QtCore.QSize(300, 0))
|
||||
self.l_signature.setMaximumSize(QtCore.QSize(300, 100))
|
||||
self.l_signature.setText("")
|
||||
self.l_signature.setWordWrap(True)
|
||||
self.l_signature.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||
self.l_signature.setObjectName("l_signature")
|
||||
@ -152,15 +157,10 @@ class Ui_Frame(object):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Frame.setWindowTitle(_translate("Frame", "Frame"))
|
||||
self.l_remark.setText(_translate("Frame", "曹雨萱"))
|
||||
self.l_gender.setText(_translate("Frame", "TextLabel"))
|
||||
self.l_nickname.setText(_translate("Frame", "昵称:997"))
|
||||
self.l_username.setText(_translate("Frame", "账号:TextLabel"))
|
||||
self.l_region.setText(_translate("Frame", "TextLabel"))
|
||||
self.label.setText(_translate("Frame", "备注名"))
|
||||
self.lineEdit.setText(_translate("Frame", "曹雨萱"))
|
||||
self.label_4.setText(_translate("Frame", "电话"))
|
||||
self.l_tel.setText(_translate("Frame", "TextLabel"))
|
||||
self.label_3.setText(_translate("Frame", "标签"))
|
||||
self.l_contact_label.setText(_translate("Frame", "TextLabel"))
|
||||
self.label_2.setText(_translate("Frame", "个性签名"))
|
||||
self.l_signature.setText(_translate("Frame", "TextLabel"))
|
||||
|
Loading…
Reference in New Issue
Block a user