def __init__(self): super(ui_MorsePanel, self).__init__() self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self) self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.MorseSpiltTips = uni_Widget.ICTFELabel(self) self.MorseSpiltTips.setObjectName("MorseSpiltTips") self.horizontalLayout.addWidget(self.MorseSpiltTips) self.MorseSpiltBox = uni_Widget.ICTFELineBox(self) self.MorseSpiltBox.setObjectName("MorseSpiltBox") self.horizontalLayout.addWidget(self.MorseSpiltBox) self.MorseChineseCheckBox = uni_Widget.ICTFECheckBox(self) self.MorseChineseCheckBox.setMinimumSize(QtCore.QSize(120, 45)) self.MorseChineseCheckBox.setMaximumSize(QtCore.QSize(120, 45)) self.MorseChineseCheckBox.setObjectName("MorseChineseCheckBox") self.horizontalLayout.addWidget(self.MorseChineseCheckBox) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.MorseEncodeButton = uni_Widget.ICTFEButton(self) self.MorseEncodeButton.setMinimumSize(QtCore.QSize(120, 45)) self.MorseEncodeButton.setMaximumSize(QtCore.QSize(120, 45)) self.MorseEncodeButton.setObjectName("MorseEncodeButton") self.horizontalLayout.addWidget(self.MorseEncodeButton) self.verticalLayout.addLayout(self.horizontalLayout) self.MorseTextBox = uni_Widget.ICTFETextBox(self) self.MorseTextBox.setObjectName("MorseTextBox") self.verticalLayout.addWidget(self.MorseTextBox) self.horizontalLayout_3.addLayout(self.verticalLayout) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem1) self.MorseDecodeButton = uni_Widget.ICTFEButton(self) self.MorseDecodeButton.setMinimumSize(QtCore.QSize(120, 45)) self.MorseDecodeButton.setMaximumSize(QtCore.QSize(120, 45)) self.MorseDecodeButton.setObjectName("MorseDecodeButton") self.horizontalLayout_2.addWidget(self.MorseDecodeButton) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.MorseCipherBox = uni_Widget.ICTFETextBox(self) self.MorseCipherBox.setObjectName("MorseCipherBox") self.verticalLayout_2.addWidget(self.MorseCipherBox) self.horizontalLayout_3.addLayout(self.verticalLayout_2) self.horizontalLayout_4.addLayout(self.horizontalLayout_3) self.retranslateUi() QtCore.QMetaObject.connectSlotsByName(self)
def LoadOptions(self, node: Node): self.setRowCount(0) try: prop = node.model.properties settings = node.model.settings self.settings = settings self.properties = prop self.node = node except AttributeError: return rows = len(prop['properties']) self.setRowCount(rows) k = 0 for i in prop['properties']: name_item = QtWidgets.QTableWidgetItem(i) name_item.setFlags(QtCore.Qt.ItemIsEditable) self.setItem(k, 0, name_item) if prop['properties'][i] == bool: exec_item = uni_Widget.ICTFECheckBox() exec_item.setText('True') exec_item.stateChanged.connect(self.GetOptions) exec_item.setChecked(settings[i]) elif prop['properties'][i] == str: exec_item = uni_Widget.ICTFELineBox() exec_item.setStyleSheet('color: white;' 'border: 0px solid gray;' 'border-radius: 0px;' 'padding: 0 4px;' 'background: rgb(30, 30, 30);' 'selection-background-color: blue;') exec_item.textEdited.connect(self.GetOptions) exec_item.setText(settings[i]) elif type(prop['properties'][i]) == list: exec_item = QtWidgets.QComboBox() font = QtGui.QFont() font.setFamily('文泉驿微米黑') font.setPixelSize(20) exec_item.setFont(font) exec_item.setStyleSheet( 'border:0px solid rgb(50, 50, 50); color: white; background-color: rgb(30,30,30)' ) for j in prop['properties'][i]: exec_item.addItem(j) exec_item.currentTextChanged.connect( lambda a: self.GetOptions()) exec_item.setCurrentText(settings[i]) else: continue self.setCellWidget(k, 1, exec_item) k += 1
def __init__(self): super(ui_CryptoPanel, self).__init__() self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) self.CryptoMainSpliter = uni_Widget.ICTFESplitter(self) self.CryptoMainSpliter.setOrientation(QtCore.Qt.Horizontal) self.CryptoMainSpliter.setObjectName("CryptoMainSpliter") self.ToolsArea = uni_Widget.ICTFEScrollArea(self.CryptoMainSpliter) self.ToolsArea.setWidgetResizable(True) self.ToolsArea.setObjectName("ToolsArea") self.ToolsAreaPanel = QtWidgets.QWidget() self.ToolsAreaPanel.setGeometry(QtCore.QRect(0, 0, 386, 698)) self.ToolsAreaPanel.setObjectName("ToolsAreaPanel") self.ToolsAreaPanel.setStyleSheet('QWidget#ToolsAreaPanel{background-color: #1e1e1e;}') self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.ToolsAreaPanel) self.verticalLayout_5.setObjectName("verticalLayout_5") self.ToolsSearchBox = uni_Widget.ICTFELineBox(self.ToolsAreaPanel) self.ToolsSearchBox.setStyleSheet('color: white;' 'border: 1px solid gray;' 'border-radius: 5px;' 'padding: 5px;' 'background: rgb(20, 20, 20);' 'selection-background-color: blue;') self.ToolsSearchBox.setPlaceholderText('搜索...') self.ToolsSearchBox.setObjectName("ToolsSearchBox") self.verticalLayout_5.addWidget(self.ToolsSearchBox) self.ToolsList = DragList(self.ToolsAreaPanel) self.ToolsList.setStyleSheet("QTreeWidget::item:hover{color: lightgrey; background-color: rgb(50,50,50)}" "QTreeWidget::item:selected{color: lightgrey; background-color:rgb(80,110,205)}" "QTreeWidget{color: lightgrey; background-color: rgb(30, 30, 30)}") self.ToolsList.setObjectName("ToolsList") self.verticalLayout_5.addWidget(self.ToolsList) self.ToolsArea.setWidget(self.ToolsAreaPanel) self.widget = QtWidgets.QWidget(self.CryptoMainSpliter) self.widget.setObjectName("widget") self.NodeEditorLayout = QtWidgets.QVBoxLayout(self.widget) self.NodeEditorLayout.setContentsMargins(0, 0, 0, 0) self.NodeEditorLayout.setObjectName("NodeEditorLayout") self.NodeEditorLayout.setSpacing(0) scene = FlowScene() self.CryptoToolNodeEditor = CryptoFlowView(scene) self.CryptoToolNodeEditor.setMinimumWidth(1000) self.CryptoToolNodeEditor.setObjectName("CryptoToolNodeEditor") self.NodeEditorLayout.addWidget(self.CryptoToolNodeEditor) self.NodeEditorLayout.addWidget(self.CryptoToolNodeEditor) self.FileAndOptionsLayout = uni_Widget.ICTFESplitter(self.CryptoMainSpliter) self.FileAndOptionsLayout.setOrientation(QtCore.Qt.Vertical) self.FileAndOptionsLayout.setObjectName("FileAndOptionsLayout") self.OptionsArea = uni_Widget.ICTFEScrollArea(self.FileAndOptionsLayout) self.OptionsArea.setWidgetResizable(True) self.OptionsArea.setObjectName("OptionsArea") self.OptionsAreaPanel = QtWidgets.QWidget() self.OptionsAreaPanel.setGeometry(QtCore.QRect(0, 0, 386, 348)) self.OptionsAreaPanel.setObjectName("OptionsAreaPanel") self.OptionsAreaPanel.setStyleSheet('background-color: transparent; border: 0px solid grey;color: white;') self.verticalLayout = QtWidgets.QVBoxLayout(self.OptionsAreaPanel) self.verticalLayout.setObjectName("verticalLayout") self.OptionsTips = uni_Widget.ICTFELabel(self.OptionsAreaPanel) self.OptionsTips.setObjectName("OptionsTips") self.SaveOptionsButton = uni_Widget.ICTFEButton(self.OptionsAreaPanel) self.SaveOptionsButton.setObjectName('SaveOptionsButton') self.SaveOptionsButton.setText('保存') self.OptionTipsLayout = QtWidgets.QHBoxLayout(self.OptionsAreaPanel) self.OptionTipsLayout.setContentsMargins(0, 0, 0, 0) self.OptionTipsLayout.addWidget(self.OptionsTips) self.OptionTipsLayout.addWidget(self.SaveOptionsButton) self.verticalLayout.addLayout(self.OptionTipsLayout) self.OptionsBox = OptionsEditBox() self.OptionsBox.setObjectName("OptionsBox") self.verticalLayout.addWidget(self.OptionsBox) self.OptionsArea.setWidget(self.OptionsAreaPanel) self.FileTempStackArea = uni_Widget.ICTFEScrollArea(self.FileAndOptionsLayout) self.FileTempStackArea.setWidgetResizable(True) self.FileTempStackArea.setObjectName("FileTempStackArea") self.FileTempStackAreaPanel = QtWidgets.QWidget() self.FileTempStackAreaPanel.setStyleSheet('background-color: transparent; color: white;') self.FileTempStackAreaPanel.setGeometry(QtCore.QRect(0, 0, 386, 347)) self.FileTempStackAreaPanel.setObjectName("FileTempStackAreaPanel") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.FileTempStackAreaPanel) self.verticalLayout_2.setObjectName("verticalLayout_2") self.FileTempStackTips = uni_Widget.ICTFELabel(self.FileTempStackAreaPanel) self.FileTempStackTips.setObjectName("FileTempStackTips") self.verticalLayout_2.addWidget(self.FileTempStackTips) self.FileTempStack = FileStack.FileStack(self.FileTempStackAreaPanel) self.FileTempStack.setObjectName("FileTempStack") self.verticalLayout_2.addWidget(self.FileTempStack) self.FileTempStackArea.setWidget(self.FileTempStackAreaPanel) self.horizontalLayout_2.addWidget(self.CryptoMainSpliter) self.retranslateUi() QtCore.QMetaObject.connectSlotsByName(self)
def __init__(self): super(ui_HashPanel, self).__init__() # input text file button self.HashTextInputPath = '' self.HashTextInputFlag = False self.horizontalLayout_14 = QtWidgets.QHBoxLayout(self) self.horizontalLayout_14.setObjectName("horizontalLayout_14") self.horizontalLayout_13 = QtWidgets.QHBoxLayout() self.horizontalLayout_13.setObjectName("horizontalLayout_13") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.HashTextInputButton = uni_Widget.ICTFEButton(self) self.HashTextInputButton.setMinimumSize(QtCore.QSize(120, 45)) self.HashTextInputButton.setMaximumSize(QtCore.QSize(120, 45)) self.HashTextInputButton.setObjectName("HashTextInputButton") self.horizontalLayout.addWidget(self.HashTextInputButton) self.HashEncodingTips = uni_Widget.ICTFELabel(self) self.HashEncodingTips.setObjectName("HashEncodingTips") self.horizontalLayout.addWidget(self.HashEncodingTips) self.HashEncodingBox = uni_Widget.ICTFELineBox(self) self.HashEncodingBox.setMaximumSize(QtCore.QSize(100, 16777215)) self.HashEncodingBox.setObjectName("HashEncodingBox") self.horizontalLayout.addWidget(self.HashEncodingBox) self.HashSaltTips = uni_Widget.ICTFELabel(self) self.HashSaltTips.setObjectName("HashSaltTips") self.horizontalLayout.addWidget(self.HashSaltTips) self.HashSaltBox = uni_Widget.ICTFELineBox(self) self.HashSaltBox.setMaximumSize(QtCore.QSize(60, 16777215)) self.HashSaltBox.setObjectName("HashSaltBox") self.horizontalLayout.addWidget(self.HashSaltBox) self.HashEvalCheckBox = uni_Widget.ICTFECheckBox(self) self.HashEvalCheckBox.setMinimumSize(QtCore.QSize(60, 45)) self.HashEvalCheckBox.setMaximumSize(QtCore.QSize(60, 45)) self.HashEvalCheckBox.setObjectName("HashEvalCheckBox") self.horizontalLayout.addWidget(self.HashEvalCheckBox) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.HashEncodeButton = uni_Widget.ICTFEButton(self) self.HashEncodeButton.setMinimumSize(QtCore.QSize(120, 45)) self.HashEncodeButton.setMaximumSize(QtCore.QSize(120, 45)) self.HashEncodeButton.setObjectName("HashEncodeButton") self.horizontalLayout.addWidget(self.HashEncodeButton) self.verticalLayout.addLayout(self.horizontalLayout) self.HashTextBox = uni_Widget.ICTFETextBox(self) self.HashTextBox.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.HashTextBox.setObjectName("HashTextBox") self.verticalLayout.addWidget(self.HashTextBox) self.horizontalLayout_13.addLayout(self.verticalLayout) self.scrollArea = uni_Widget.ICTFEScrollArea(self) self.scrollArea.setWidgetResizable(True) self.scrollArea.setObjectName("scrollArea") self.scrollAreaWidgetContents = QtWidgets.QWidget() self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 516, 731)) self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") self.verticalLayout_2 = QtWidgets.QVBoxLayout( self.scrollAreaWidgetContents) self.verticalLayout_2.setObjectName("verticalLayout_2") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.HashTips = uni_Widget.ICTFELabel(self.scrollAreaWidgetContents) self.HashTips.setObjectName("HashTips") self.horizontalLayout_2.addWidget(self.HashTips) self.HashValueBox = uni_Widget.ICTFELineBox( self.scrollAreaWidgetContents) self.HashValueBox.setObjectName("HashValueBox") self.HashValueBox.setMinimumHeight(45) self.horizontalLayout_2.addWidget(self.HashValueBox) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.MD5Tips = uni_Widget.ICTFELabel(self.scrollAreaWidgetContents) self.MD5Tips.setObjectName("MD5Tips") self.horizontalLayout_3.addWidget(self.MD5Tips) self.MD5ValueBox = uni_Widget.ICTFELineBox( self.scrollAreaWidgetContents) self.MD5ValueBox.setObjectName("MD5ValueBox") self.MD5ValueBox.setMinimumHeight(45) self.horizontalLayout_3.addWidget(self.MD5ValueBox) self.verticalLayout_2.addLayout(self.horizontalLayout_3) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.SHA1Tips = uni_Widget.ICTFELabel(self.scrollAreaWidgetContents) self.SHA1Tips.setObjectName("SHA1Tips") self.horizontalLayout_4.addWidget(self.SHA1Tips) self.SHA1ValueBox = uni_Widget.ICTFELineBox( self.scrollAreaWidgetContents) self.SHA1ValueBox.setObjectName("SHA1ValueBox") self.SHA1ValueBox.setMinimumHeight(45) self.horizontalLayout_4.addWidget(self.SHA1ValueBox) self.verticalLayout_2.addLayout(self.horizontalLayout_4) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.SHA224Tips = uni_Widget.ICTFELabel(self.scrollAreaWidgetContents) self.SHA224Tips.setObjectName("SHA224Tips") self.horizontalLayout_5.addWidget(self.SHA224Tips) self.SHA224ValueBox = uni_Widget.ICTFELineBox( self.scrollAreaWidgetContents) self.SHA224ValueBox.setObjectName("SHA224ValueBox") self.SHA224ValueBox.setMinimumHeight(45) self.horizontalLayout_5.addWidget(self.SHA224ValueBox) self.verticalLayout_2.addLayout(self.horizontalLayout_5) self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.SHA256Tips = uni_Widget.ICTFELabel(self.scrollAreaWidgetContents) self.SHA256Tips.setObjectName("SHA256Tips") self.horizontalLayout_6.addWidget(self.SHA256Tips) self.SHA256ValueBox = uni_Widget.ICTFELineBox( self.scrollAreaWidgetContents) self.SHA256ValueBox.setObjectName("SHA256ValueBox") self.SHA256ValueBox.setMinimumHeight(45) self.horizontalLayout_6.addWidget(self.SHA256ValueBox) self.verticalLayout_2.addLayout(self.horizontalLayout_6) self.horizontalLayout_7 = QtWidgets.QHBoxLayout() self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.SHA384Tips = uni_Widget.ICTFELabel(self.scrollAreaWidgetContents) self.SHA384Tips.setObjectName("SHA384Tips") self.horizontalLayout_7.addWidget(self.SHA384Tips) self.SHA384ValueBox = uni_Widget.ICTFELineBox( self.scrollAreaWidgetContents) self.SHA384ValueBox.setObjectName("SHA384ValueBox") self.SHA384ValueBox.setMinimumHeight(45) self.horizontalLayout_7.addWidget(self.SHA384ValueBox) self.verticalLayout_2.addLayout(self.horizontalLayout_7) self.horizontalLayout_8 = QtWidgets.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") self.SHA512Tips = uni_Widget.ICTFELabel(self.scrollAreaWidgetContents) self.SHA512Tips.setObjectName("SHA512Tips") self.horizontalLayout_8.addWidget(self.SHA512Tips) self.SHA512ValueBox = uni_Widget.ICTFELineBox( self.scrollAreaWidgetContents) self.SHA512ValueBox.setObjectName("SHA512ValueBox") self.SHA512ValueBox.setMinimumHeight(45) self.horizontalLayout_8.addWidget(self.SHA512ValueBox) self.verticalLayout_2.addLayout(self.horizontalLayout_8) self.horizontalLayout_9 = QtWidgets.QHBoxLayout() self.horizontalLayout_9.setObjectName("horizontalLayout_9") self.SHA3224Tips = uni_Widget.ICTFELabel(self.scrollAreaWidgetContents) self.SHA3224Tips.setObjectName("SHA3224Tips") self.horizontalLayout_9.addWidget(self.SHA3224Tips) self.SHA3224ValueBox = uni_Widget.ICTFELineBox( self.scrollAreaWidgetContents) self.SHA3224ValueBox.setObjectName("SHA3224ValueBox") self.SHA3224ValueBox.setMinimumHeight(45) self.horizontalLayout_9.addWidget(self.SHA3224ValueBox) self.verticalLayout_2.addLayout(self.horizontalLayout_9) self.horizontalLayout_10 = QtWidgets.QHBoxLayout() self.horizontalLayout_10.setObjectName("horizontalLayout_10") self.SHA3256Tips = uni_Widget.ICTFELabel(self.scrollAreaWidgetContents) self.SHA3256Tips.setObjectName("SHA3256Tips") self.horizontalLayout_10.addWidget(self.SHA3256Tips) self.SHA3256ValueBox = uni_Widget.ICTFELineBox( self.scrollAreaWidgetContents) self.SHA3256ValueBox.setObjectName("SHA3256ValueBox") self.SHA3256ValueBox.setMinimumHeight(45) self.horizontalLayout_10.addWidget(self.SHA3256ValueBox) self.verticalLayout_2.addLayout(self.horizontalLayout_10) self.horizontalLayout_11 = QtWidgets.QHBoxLayout() self.horizontalLayout_11.setObjectName("horizontalLayout_11") self.SHA3384Tips = uni_Widget.ICTFELabel(self.scrollAreaWidgetContents) self.SHA3384Tips.setObjectName("SHA3384Tips") self.horizontalLayout_11.addWidget(self.SHA3384Tips) self.SHA3384ValueBox = uni_Widget.ICTFELineBox( self.scrollAreaWidgetContents) self.SHA3384ValueBox.setObjectName("SHA3384ValueBox") self.SHA3384ValueBox.setMinimumHeight(45) self.horizontalLayout_11.addWidget(self.SHA3384ValueBox) self.verticalLayout_2.addLayout(self.horizontalLayout_11) self.horizontalLayout_12 = QtWidgets.QHBoxLayout() self.horizontalLayout_12.setObjectName("horizontalLayout_12") self.SHA3512Tips = uni_Widget.ICTFELabel(self.scrollAreaWidgetContents) self.SHA3512Tips.setTextFormat(QtCore.Qt.AutoText) self.SHA3512Tips.setObjectName("SHA3512Tips") self.horizontalLayout_12.addWidget(self.SHA3512Tips) self.SHA3512ValueBox = uni_Widget.ICTFELineBox( self.scrollAreaWidgetContents) self.SHA3512ValueBox.setObjectName("SHA3512ValueBox") self.SHA3512ValueBox.setMinimumHeight(45) self.horizontalLayout_12.addWidget(self.SHA3512ValueBox) self.verticalLayout_2.addLayout(self.horizontalLayout_12) self.scrollArea.setWidget(self.scrollAreaWidgetContents) self.horizontalLayout_13.addWidget(self.scrollArea) self.horizontalLayout_14.addLayout(self.horizontalLayout_13) self.retranslateUi() QtCore.QMetaObject.connectSlotsByName(self)
def __init__(self, Main, parent=None): super(BrowserTab, self).__init__(parent) self.mainWindow = Main self.browser = BrowserEngineView(self.mainWindow) pwd = os.getcwd() pwd = pwd.replace('\\', '/') self.browser.load( QUrl('file:///' + pwd + '/Resources/Search/Search.html')) self.setCentralWidget(self.browser) self.navigation_bar = QToolBar('Navigation') self.navigation_bar.setIconSize(QSize(18, 18)) self.navigation_bar.setMaximumHeight(35) self.navigation_bar.setContentsMargins(1, -1, 1, -1) self.navigation_bar.setStyleSheet('QToolBar{border: 1px solid grey;}') self.addToolBar(self.navigation_bar) osinfo = platform.system() if osinfo == 'Windows': self.browser.settings().setFontFamily( QWebEngineSettings.StandardFont, '微软雅黑') self.browser.settings().setFontFamily(QWebEngineSettings.FixedFont, '微软雅黑') self.browser.settings().setFontFamily(QWebEngineSettings.SerifFont, '微软雅黑') self.browser.settings().setFontFamily( QWebEngineSettings.SansSerifFont, '微软雅黑') self.browser.settings().setFontFamily( QWebEngineSettings.CursiveFont, '微软雅黑') self.back_button = QAction(QIcon('Assets/back.png'), '后退', self) self.next_button = QAction(QIcon('Assets/forward.png'), '前进', self) self.stop_button = QAction(QIcon('Assets/stop.png'), '停止', self) self.refresh_button = QAction(QIcon('Assets/refresh.png'), '刷新', self) self.home_button = QAction(QIcon('Assets/home.png'), '主页', self) self.enter_button = QAction(QIcon('Assets/enter.png'), '转到', self) self.add_button = QAction(QIcon('Assets/new.png'), '新建标签页', self) self.ssl_label1 = QLabel(self) self.ssl_label1.setPixmap( QPixmap("Assets/main.png").scaledToHeight(18)) self.ssl_label2 = QLabel(self) self.ssl_label2.setText(" 欢迎来到ICTFE ") self.ssl_label2.setStyleSheet("color:white;") self.url_text_bar = uni_Widget.ICTFELineBox(self) self.url_text_bar.setMinimumWidth(300) self.url_text_bar.resize(1000, 30) self.url_text_bar.setStyleSheet('color: white;' 'border: 1px solid gray;' 'border-radius: 0px;' 'padding: 0 0px;' 'background: rgb(20, 20, 20);' 'selection-background-color: blue;' 'font: 18px;') self.navigation_bar.addAction(self.back_button) self.navigation_bar.addAction(self.next_button) self.navigation_bar.addAction(self.refresh_button) self.navigation_bar.addAction(self.home_button) self.navigation_bar.addAction(self.add_button) self.navigation_bar.addWidget(self.ssl_label1) self.navigation_bar.addWidget(self.ssl_label2) self.navigation_bar.addWidget(self.url_text_bar) self.navigation_bar.addAction(self.enter_button) self.navigation_bar.setMovable(False) self.shortcutd = QShortcut(QKeySequence("Ctrl+="), self) self.shortcutd.activated.connect(self.zoom_in_func) self.shortcutu = QShortcut(QKeySequence("Ctrl+-"), self) self.shortcutu.activated.connect(self.zoom_out_func)