Python PyQt4.QtGui.QFont() Examples
The following are 30
code examples of PyQt4.QtGui.QFont().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PyQt4.QtGui
, or try the search function
.
Example #1
Source File: easygui_qt.py From easygui_qt with BSD 3-Clause "New" or "Revised" License | 7 votes |
def __init__(self): super(SimpleApp, self).__init__([]) self.translator = QtCore.QTranslator() self.default_font = QtGui.QFont() if sys.version_info < (3,) : settings_path = ".easygui-qt2" else: settings_path = ".easygui-qt3" self.config_path = os.path.join(os.path.expanduser("~"), settings_path) try: self.load_config() self.setFont(self.default_font) except: pass self.save_config()
Example #2
Source File: uiutils.py From ddt4all with GNU General Public License v3.0 | 6 votes |
def jsonFont(fnt, scale): font_name = fnt['name'] font_size = fnt['size'] if 'bold' in fnt: font_bold = fnt['bold'] else: font_bold = '0' if 'italic' in fnt: font_italic = fnt['italic'] else: font_italic = '0' if font_bold == '1': fnt_flags = gui.QFont.Bold else: fnt_flags = gui.QFont.Normal if font_italic == '1': fnt_flags |= gui.QFont.StyleItalic font_size = font_size / float(scale) * 14. qfnt = gui.QFont(font_name, font_size, fnt_flags); qfnt.setPixelSize(font_size) return qfnt
Example #3
Source File: show_text_window.py From easygui_qt with BSD 3-Clause "New" or "Revised" License | 6 votes |
def __init__(self, parent=None): super(Highlighter, self).__init__(parent) keywordFormat = QtGui.QTextCharFormat() keywordFormat.setForeground(QtCore.Qt.blue) keywordFormat.setFontWeight(QtGui.QFont.Bold) keywordPatterns = ["\\b{}\\b".format(k) for k in keyword.kwlist] self.highlightingRules = [(QtCore.QRegExp(pattern), keywordFormat) for pattern in keywordPatterns] classFormat = QtGui.QTextCharFormat() classFormat.setFontWeight(QtGui.QFont.Bold) self.highlightingRules.append((QtCore.QRegExp("\\bQ[A-Za-z]+\\b"), classFormat)) singleLineCommentFormat = QtGui.QTextCharFormat() singleLineCommentFormat.setForeground(QtCore.Qt.gray) self.highlightingRules.append((QtCore.QRegExp("#[^\n]*"), singleLineCommentFormat)) quotationFormat = QtGui.QTextCharFormat() quotationFormat.setForeground(QtCore.Qt.darkGreen) self.highlightingRules.append((QtCore.QRegExp("\".*\""), quotationFormat)) self.highlightingRules.append((QtCore.QRegExp("'.*'"), quotationFormat))
Example #4
Source File: procexp.py From procexp with GNU General Public License v3.0 | 6 votes |
def setFontSize(fontSize): global g_settings g_settings["fontSize"] = fontSize font = QtGui.QFont() font.setPointSize(fontSize) g_mainUi.menuFile.setFont(font) g_mainUi.menuOptions.setFont(font) g_mainUi.menuView.setFont(font) g_mainUi.menuProcess.setFont(font) g_mainUi.menuSettings.setFont(font) g_mainUi.menubar.setFont(font) g_mainUi.processTreeWidget.setFont(font) if g_systemOverviewUi is not None: g_systemOverviewUi.setFontSize(fontSize) if g_networkOverviewUi is not None: g_networkOverviewUi.setFontSize(fontSize)
Example #5
Source File: uiutils.py From ddt4all with GNU General Public License v3.0 | 6 votes |
def getXMLFont(xml, scale = 1): font = getChildNodesByName(xml, "Font")[0] font_name = font.getAttribute("Name") font_size = float(font.getAttribute("Size").replace(',', '.')) font_bold = font.getAttribute("Bold") font_italic = font.getAttribute("Italic") if font_bold == '1': fnt_flags = gui.QFont.Bold else: fnt_flags = gui.QFont.Normal if font_italic == '1': fnt_flags |= gui.QFont.StyleItalic font_size = font_size / float(scale) * 14. qfnt = gui.QFont(font_name, font_size, fnt_flags) qfnt.setPixelSize(font_size) return qfnt
Example #6
Source File: console.py From encompass with GNU General Public License v3.0 | 6 votes |
def __init__(self, prompt='>> ', startup_message='', parent=None): QtGui.QPlainTextEdit.__init__(self, parent) self.prompt = prompt self.history = [] self.namespace = {} self.construct = [] self.setGeometry(50, 75, 600, 400) self.setWordWrapMode(QtGui.QTextOption.WrapAnywhere) self.setUndoRedoEnabled(False) self.document().setDefaultFont(QtGui.QFont(MONOSPACE_FONT, 10, QtGui.QFont.Normal)) self.showMessage(startup_message) self.updateNamespace({'run':self.run_script}) self.set_json(False)
Example #7
Source File: gui_switch.py From rpi-course with MIT License | 6 votes |
def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(400, 240) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.checkBox = QtGui.QCheckBox(self.centralwidget) self.checkBox.setGeometry(QtCore.QRect(130, 80, 151, 41)) font = QtGui.QFont() font.setPointSize(32) self.checkBox.setFont(font) self.checkBox.setObjectName(_fromUtf8("checkBox")) #MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 400, 21)) self.menubar.setObjectName(_fromUtf8("menubar")) #MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) #MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
Example #8
Source File: gui.py From rpi-course with MIT License | 6 votes |
def setupUi(self, Dialog): Dialog.setObjectName(_fromUtf8("Dialog")) Dialog.resize(400, 300) self.pushButton = QtGui.QPushButton(Dialog) self.pushButton.setGeometry(QtCore.QRect(250, 140, 75, 23)) self.pushButton.setObjectName(_fromUtf8("pushButton")) self.lineEdit = QtGui.QLineEdit(Dialog) self.lineEdit.setGeometry(QtCore.QRect(50, 140, 191, 20)) self.lineEdit.setObjectName(_fromUtf8("lineEdit")) self.label = QtGui.QLabel(Dialog) self.label.setGeometry(QtCore.QRect(100, 180, 201, 51)) font = QtGui.QFont() font.setPointSize(20) self.label.setFont(font) self.label.setObjectName(_fromUtf8("label")) self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
Example #9
Source File: networkoverview.py From procexp with GNU General Public License v3.0 | 5 votes |
def setFontSize(self, fontSize): """set font size of this dialog""" font = QtGui.QFont() font.setPointSize(fontSize) self.__dialog__.setFont(font)
Example #10
Source File: System.py From launcher with GNU General Public License v2.0 | 5 votes |
def paintEvent(self, e): qp=QtGui.QPainter() qp.begin(self) qp.setFont(QtGui.QFont(Config.get()["font"],12)) qp.setRenderHint(QtGui.QPainter.Antialiasing) qp.setPen(QtGui.QColor(250,250,250,0)) qp.setBrush(QtGui.QColor(self.r,self.g,self.b)) qp.drawRoundedRect(QtCore.QRectF(0,0,self.w,self.h),2,2) #title if self.drawButtonRect==True and self.buttonRect!=None: qp.setPen(QtGui.QColor(0,0,0,0)) qp.setBrush(QtGui.QColor(254,254,255,50)) qp.drawRect(self.buttonRect) textRect=QtCore.QRectF(0,0,self.w,40) qp.setPen(QtGui.QColor(250,250,250)) if self.state=="logout": if "XFCE" or "Duck" in os.environ.get("XDG_CURRENT_DESKTOP"): qp.drawText(textRect,QtCore.Qt.AlignCenter,"Log out from your computer?") else: qp.drawText(textRect,QtCore.Qt.AlignCenter,"Sorry, logout is not supported yet..") i = QtGui.QIcon("/usr/share/duck-launcher/default-theme/logout.svg") i.paint(qp, self.w/2-40,self.h/2-60,80,80) if self.state=="restart": qp.drawText(textRect,QtCore.Qt.AlignCenter,"Restart your computer?") i = QtGui.QIcon("/usr/share/duck-launcher/default-theme/restart.svg") i.paint(qp, self.w/2-40,self.h/2-60,80,80) if self.state=="shutdown": qp.drawText(textRect,QtCore.Qt.AlignCenter,"Shut down your computer?") i = QtGui.QIcon("/usr/share/duck-launcher/default-theme/shutdown.svg") i.paint(qp, self.w/2-40,self.h/2-60,80,80) ##Yes No qp.drawLine(20,self.h-50, self.w-20,self.h-50) qp.drawLine(self.w/2, self.h-40, self.w/2,self.h-10) qp.drawText(QtCore.QRectF(0,self.h-50,self.w/2-6,50),QtCore.Qt.AlignCenter, "No") qp.drawText(QtCore.QRectF(self.w/2+2,self.h-50,self.w/2,50),QtCore.Qt.AlignCenter, "Yes")
Example #11
Source File: uiBasicWidget修改.py From chanlun with MIT License | 5 votes |
def loadFont(): """载入字体设置""" try: f = file("VT_setting.json") setting = json.load(f) family = setting['fontFamily'] size = setting['fontSize'] font = QtGui.QFont(family, size) except: font = QtGui.QFont(u'微软雅黑', 12) return font
Example #12
Source File: uiBasicWidget.py From chanlun with MIT License | 5 votes |
def loadFont(): """载入字体设置""" try: f = file("VT_setting.json") setting = json.load(f) family = setting['fontFamily'] size = setting['fontSize'] font = QtGui.QFont(family, size) except: font = QtGui.QFont(u'微软雅黑', 12) return font
Example #13
Source File: show_submission.py From TPN with MIT License | 5 votes |
def draw_predictions(file_path, predictions, class_index, score_low, score_high): img = QtGui.QImage(file_path) painter = QtGui.QPainter(img) for i, pred in enumerate(predictions): if class_index > 0 and pred.class_index != class_index: continue if pred.score < score_low or pred.score > score_high: continue class_name = CLASS_NAMES[pred.class_index] x1, y1, x2, y2 = map(int, pred.bbox) # bbox painter.setPen(QtGui.QPen(PRESET_COLORS[pred.class_index], 10.0)) # painter.setPen(QtGui.QPen(QtGui.QColor(0, 116, 217), 10.0)) painter.setBrush(QtGui.QBrush()) painter.drawRect(x1, y1, x2 - x1 + 1, y2 - y1 + 1) # label background rect painter.setPen(QtGui.QPen(PRESET_COLORS[pred.class_index], 2.0)) painter.setBrush(QtGui.QBrush(PRESET_COLORS[pred.class_index])) # painter.setPen(QtGui.QPen(QtGui.QColor(0, 116, 217), 2.0)) # painter.setBrush(QtGui.QBrush(QtGui.QColor(0, 116, 217))) if class_index > 0: painter.drawRect(x1, y1, min(x2 - x1 + 1, 100), 30) else: painter.drawRect(x1, y1, min(x2 - x1 + 1, 200), 30) # label text painter.setPen(QtGui.QPen(QtGui.QColor(255, 255, 255))) painter.setBrush(QtGui.QBrush()) painter.setFont(QtGui.QFont('Arial', 20, QtGui.QFont.Bold)) if class_index > 0: painter.drawText(x1 + 4, y1 + 24, '{:.2f}'.format(pred.score)) else: painter.drawText(x1 + 4, y1 + 24, '{} {:.2f}'.format(class_name, pred.score)) return img
Example #14
Source File: uiBasicWidget.py From TradeSim with Apache License 2.0 | 5 votes |
def loadFont(): """载入字体设置""" try: f = file("setting/VT_setting.json") setting = json.load(f) family = setting['fontFamily'] size = setting['fontSize'] font = QtGui.QFont(family, size) except: font = QtGui.QFont(u'微软雅黑', 12) return font
Example #15
Source File: systemoverview.py From procexp with GNU General Public License v3.0 | 5 votes |
def setFontSize(self, fontSize): font = QtGui.QFont() font.setPointSize(fontSize) self.__dialog__.setFont(font)
Example #16
Source File: appgui.py From mishkal with GNU General Public License v3.0 | 5 votes |
def restore_default_font(self): self.font_result=QtGui.QFont(DefaultFont.family(),DefaultFont.pointSize(),DefaultFont.bold()); fonttext=self.font_result.family()+"[%s]"%str(self.font_result.pointSize()) self.TSettingFontResult.setText(fonttext) self.TSettingFontResult.update() ## self.centralwidget.update();
Example #17
Source File: setting.py From mishkal with GNU General Public License v3.0 | 5 votes |
def restore_default_font(self): self.font_result=QtGui.QFont(DefaultFont.family(),DefaultFont.pointSize(),DefaultFont.bold()); self.set_font_box();
Example #18
Source File: FlowchartTemplate_pyqt.py From tf-pose with Apache License 2.0 | 5 votes |
def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(529, 329) self.selInfoWidget = QtGui.QWidget(Form) self.selInfoWidget.setGeometry(QtCore.QRect(260, 10, 264, 222)) self.selInfoWidget.setObjectName(_fromUtf8("selInfoWidget")) self.gridLayout = QtGui.QGridLayout(self.selInfoWidget) self.gridLayout.setMargin(0) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.selDescLabel = QtGui.QLabel(self.selInfoWidget) self.selDescLabel.setText(_fromUtf8("")) self.selDescLabel.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) self.selDescLabel.setWordWrap(True) self.selDescLabel.setObjectName(_fromUtf8("selDescLabel")) self.gridLayout.addWidget(self.selDescLabel, 0, 0, 1, 1) self.selNameLabel = QtGui.QLabel(self.selInfoWidget) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.selNameLabel.setFont(font) self.selNameLabel.setText(_fromUtf8("")) self.selNameLabel.setObjectName(_fromUtf8("selNameLabel")) self.gridLayout.addWidget(self.selNameLabel, 0, 1, 1, 1) self.selectedTree = DataTreeWidget(self.selInfoWidget) self.selectedTree.setObjectName(_fromUtf8("selectedTree")) self.selectedTree.headerItem().setText(0, _fromUtf8("1")) self.gridLayout.addWidget(self.selectedTree, 1, 0, 1, 2) self.hoverText = QtGui.QTextEdit(Form) self.hoverText.setGeometry(QtCore.QRect(0, 240, 521, 81)) self.hoverText.setObjectName(_fromUtf8("hoverText")) self.view = FlowchartGraphicsView(Form) self.view.setGeometry(QtCore.QRect(0, 0, 256, 192)) self.view.setObjectName(_fromUtf8("view")) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
Example #19
Source File: DockAppsOptions.py From launcher with GNU General Public License v2.0 | 5 votes |
def updateWidth(self): self.drawButtonRect=False if self.app.has_key("name"): textFont =QtGui.QFont(Config.get()["font"],16) fm = QtGui.QFontMetrics(textFont) whole_width=0 for i,s in enumerate(self.app["name"]): w = int(fm.charWidth(self.app["name"],i)) whole_width+=w if whole_width<110: whole_width=110 self.width=whole_width self.update_all(self.conf)
Example #20
Source File: uiBasicWidget.py From InplusTrader_Linux with MIT License | 5 votes |
def loadFont(): """载入字体设置""" fileName = 'VT_setting.json' path = os.path.abspath(os.path.dirname(__file__)) fileName = os.path.join(path, fileName) try: f = file(fileName) setting = json.load(f) family = setting['fontFamily'] size = setting['fontSize'] font = QtGui.QFont(family, size) except: font = QtGui.QFont(u'微软雅黑', 12) return font
Example #21
Source File: howToWidget.py From Stormy with GNU General Public License v2.0 | 5 votes |
def setupUi(self, howToWidget): howToWidget.setObjectName(_fromUtf8("howToWidget")) howToWidget.resize(800, 600) howToWidget.setStyleSheet(_fromUtf8("")) self.logoImg = LogoImage(howToWidget) self.logoImg.setGeometry(QtCore.QRect(698, 10, 141, 101)) self.logoImg.setObjectName(_fromUtf8("logoImg")) self.howToUseLabel = QtGui.QLabel(howToWidget) self.howToUseLabel.setGeometry(QtCore.QRect(60, 50, 271, 31)) font = QtGui.QFont() font.setPointSize(16) font.setBold(True) font.setWeight(75) self.howToUseLabel.setFont(font) self.howToUseLabel.setObjectName(_fromUtf8("howToUseLabel")) self.setupPushButton = QtGui.QPushButton(howToWidget) self.setupPushButton.setGeometry(QtCore.QRect(714, 130, 71, 27)) self.setupPushButton.setStyleSheet(_fromUtf8("background-color:rgb(85, 170, 255);\n" "color:rgb(255,255,255)")) self.setupPushButton.setObjectName(_fromUtf8("setupPushButton")) self.helpPushButton = QtGui.QPushButton(howToWidget) self.helpPushButton.setGeometry(QtCore.QRect(713, 163, 71, 27)) self.helpPushButton.setStyleSheet(_fromUtf8("background-color:rgb(85, 170, 255);\n" "color:rgb(255,255,255)")) self.helpPushButton.setObjectName(_fromUtf8("helpPushButton")) self.howToUseTextBrowser = QtGui.QTextBrowser(howToWidget) self.howToUseTextBrowser.setGeometry(QtCore.QRect(60, 110, 561, 431)) self.howToUseTextBrowser.setObjectName(_fromUtf8("howToUseTextBrowser")) self.retranslateUi(howToWidget) QtCore.QMetaObject.connectSlotsByName(howToWidget)
Example #22
Source File: Source.py From eSim with GNU General Public License v3.0 | 5 votes |
def __init__(self, sourcelist, sourcelisttrack, clarg1): QtGui.QWidget.__init__(self) self.obj_track = TrackWidget.TrackWidget() # Variables self.count = 1 self.clarg1 = clarg1 self.start = 0 self.end = 0 self.row = 0 self.entry_var = {} # self.font = QtGui.QFont("Times",20,QtGui.QFont.Bold,True) # Creating Source Widget self.createSourceWidget(sourcelist, sourcelisttrack)
Example #23
Source File: FlowchartTemplate_pyqt.py From soapy with GNU General Public License v3.0 | 5 votes |
def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(529, 329) self.selInfoWidget = QtGui.QWidget(Form) self.selInfoWidget.setGeometry(QtCore.QRect(260, 10, 264, 222)) self.selInfoWidget.setObjectName(_fromUtf8("selInfoWidget")) self.gridLayout = QtGui.QGridLayout(self.selInfoWidget) self.gridLayout.setMargin(0) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.selDescLabel = QtGui.QLabel(self.selInfoWidget) self.selDescLabel.setText(_fromUtf8("")) self.selDescLabel.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) self.selDescLabel.setWordWrap(True) self.selDescLabel.setObjectName(_fromUtf8("selDescLabel")) self.gridLayout.addWidget(self.selDescLabel, 0, 0, 1, 1) self.selNameLabel = QtGui.QLabel(self.selInfoWidget) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.selNameLabel.setFont(font) self.selNameLabel.setText(_fromUtf8("")) self.selNameLabel.setObjectName(_fromUtf8("selNameLabel")) self.gridLayout.addWidget(self.selNameLabel, 0, 1, 1, 1) self.selectedTree = DataTreeWidget(self.selInfoWidget) self.selectedTree.setObjectName(_fromUtf8("selectedTree")) self.selectedTree.headerItem().setText(0, _fromUtf8("1")) self.gridLayout.addWidget(self.selectedTree, 1, 0, 1, 2) self.hoverText = QtGui.QTextEdit(Form) self.hoverText.setGeometry(QtCore.QRect(0, 240, 521, 81)) self.hoverText.setObjectName(_fromUtf8("hoverText")) self.view = FlowchartGraphicsView(Form) self.view.setGeometry(QtCore.QRect(0, 0, 256, 192)) self.view.setObjectName(_fromUtf8("view")) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
Example #24
Source File: run.py From Open-Browser with GNU General Public License v3.0 | 5 votes |
def createWidgets(self): self.dbx_grid = QtGui.QGridLayout() self.dbx_code_label = QtGui.QLabel('Enter the code here: ') self.dbx_code_label.setFont(QtGui.QFont("Arial", weight=QtGui.QFont.Bold)) self.dbx_getCode = QtGui.QLineEdit() self.dbx_grid.addWidget(self.dbx_code_label,0,1) self.dbx_grid.addWidget(self.dbx_getCode,0,2) self.dbx_save_button = QtGui.QPushButton('Save') self.dbx_save_button.setFixedWidth(90) self.dbx_save_button.clicked.connect(self.createAppFolder) self.dbx_grid.addWidget(self.dbx_save_button,0,3) self.dbx_grid.addWidget(self.dbx_tabWidget,3,1,1,3) self.generateCode() self.setLayout(self.dbx_grid)
Example #25
Source File: FlowchartTemplate_pyqt.py From qgisSpaceSyntaxToolkit with GNU General Public License v3.0 | 5 votes |
def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(529, 329) self.selInfoWidget = QtGui.QWidget(Form) self.selInfoWidget.setGeometry(QtCore.QRect(260, 10, 264, 222)) self.selInfoWidget.setObjectName(_fromUtf8("selInfoWidget")) self.gridLayout = QtGui.QGridLayout(self.selInfoWidget) self.gridLayout.setMargin(0) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.selDescLabel = QtGui.QLabel(self.selInfoWidget) self.selDescLabel.setText(_fromUtf8("")) self.selDescLabel.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) self.selDescLabel.setWordWrap(True) self.selDescLabel.setObjectName(_fromUtf8("selDescLabel")) self.gridLayout.addWidget(self.selDescLabel, 0, 0, 1, 1) self.selNameLabel = QtGui.QLabel(self.selInfoWidget) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.selNameLabel.setFont(font) self.selNameLabel.setText(_fromUtf8("")) self.selNameLabel.setObjectName(_fromUtf8("selNameLabel")) self.gridLayout.addWidget(self.selNameLabel, 0, 1, 1, 1) self.selectedTree = DataTreeWidget(self.selInfoWidget) self.selectedTree.setObjectName(_fromUtf8("selectedTree")) self.selectedTree.headerItem().setText(0, _fromUtf8("1")) self.gridLayout.addWidget(self.selectedTree, 1, 0, 1, 2) self.hoverText = QtGui.QTextEdit(Form) self.hoverText.setGeometry(QtCore.QRect(0, 240, 521, 81)) self.hoverText.setObjectName(_fromUtf8("hoverText")) self.view = FlowchartGraphicsView(Form) self.view.setGeometry(QtCore.QRect(0, 0, 256, 192)) self.view.setObjectName(_fromUtf8("view")) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
Example #26
Source File: guiMainQQ.py From PyLinuxQQ with GNU General Public License v2.0 | 5 votes |
def setupFont(self): self.font1 = QtGui.QFont() self.font1.setFamily(_fromUtf8("Helvetica")) self.font1.setPointSize(14) self.font1.setBold(True) self.font1.setWeight(75) self.font2 = QtGui.QFont() self.font2.setFamily(_fromUtf8("Helvetica")) self.font2.setPointSize(13) self.font2.setBold(False) self.font2.setWeight(50) self.font3 = QtGui.QFont() self.font3.setFamily(_fromUtf8("Helvetica")) self.font3.setPointSize(9)
Example #27
Source File: guiChatQQ.py From PyLinuxQQ with GNU General Public License v2.0 | 5 votes |
def setupUi(self, Chat): self.main=Chat Chat.setWindowTitle(_translate("Chat", "聊天", None)) Chat.resize(575, 524) # font self.font = QtGui.QFont() self.font.setFamily(_fromUtf8("Helvetica")) self.font.setPointSize(13) self.font.setBold(True) self.font.setItalic(False) self.font.setWeight(75) self.font2 = QtGui.QFont() self.font2.setFamily(_fromUtf8("Helvetica")) self.font2.setPointSize(9) # side bar self.listWidget_Users = QtGui.QListWidget(Chat) self.listWidget_Users.setGeometry(QtCore.QRect(0, 0, 94, 521)) self.listWidget_Users.setSpacing(2) self.line = QtGui.QFrame(Chat) self.line.setGeometry(QtCore.QRect(97, 0, 10, 521)) self.line.setFrameShape(QtGui.QFrame.VLine) self.line.setFrameShadow(QtGui.QFrame.Sunken) # stack widget self.stackedWidget = QtGui.QStackedWidget(Chat) self.stackedWidget.setGeometry(QtCore.QRect(100, 0, 471, 521)) # page self.stack = {} self.listWidget = {} self.sideButton = {} self.button_send = {} self.button_close ={} self.item_widget={} self.textEdit = {} QtCore.QMetaObject.connectSlotsByName(Chat) # data self.groupInfo={} #gcode self.discussInfo={}
Example #28
Source File: initial_window_ui.py From EasyStorj with MIT License | 5 votes |
def setupUi(self, InitialWindow): InitialWindow.setObjectName(_fromUtf8("InitialWindow")) InitialWindow.resize(820, 202) self.label = QtGui.QLabel(InitialWindow) self.label.setGeometry(QtCore.QRect(10, 0, 801, 61)) self.label.setObjectName(_fromUtf8("label")) self.line = QtGui.QFrame(InitialWindow) self.line.setGeometry(QtCore.QRect(10, 50, 801, 20)) self.line.setFrameShape(QtGui.QFrame.HLine) self.line.setFrameShadow(QtGui.QFrame.Sunken) self.line.setObjectName(_fromUtf8("line")) self.login_bt = QtGui.QPushButton(InitialWindow) self.login_bt.setGeometry(QtCore.QRect(10, 70, 401, 71)) font = QtGui.QFont() font.setPointSize(18) self.login_bt.setFont(font) self.login_bt.setObjectName(_fromUtf8("login_bt")) self.register_bt = QtGui.QPushButton(InitialWindow) self.register_bt.setGeometry(QtCore.QRect(420, 70, 391, 71)) font = QtGui.QFont() font.setPointSize(18) self.register_bt.setFont(font) self.register_bt.setObjectName(_fromUtf8("register_bt")) self.about_bt = QtGui.QPushButton(InitialWindow) self.about_bt.setGeometry(QtCore.QRect(10, 150, 801, 41)) font = QtGui.QFont() font.setPointSize(18) self.about_bt.setFont(font) self.about_bt.setObjectName(_fromUtf8("about_bt")) self.retranslateUi(InitialWindow) QtCore.QMetaObject.connectSlotsByName(InitialWindow)
Example #29
Source File: DB_UI_main.py From LLP_026_MySQL_PyQt_Example with GNU General Public License v2.0 | 5 votes |
def setupUi(self, TPayne_MySQL_Tool): TPayne_MySQL_Tool.setObjectName(_fromUtf8("TPayne_MySQL_Tool")) TPayne_MySQL_Tool.resize(457, 235) self.verticalLayout_2 = QtGui.QVBoxLayout(TPayne_MySQL_Tool) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.verticalLayout = QtGui.QVBoxLayout() self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.label = QtGui.QLabel(TPayne_MySQL_Tool) font = QtGui.QFont() font.setPointSize(20) self.label.setFont(font) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName(_fromUtf8("label")) self.verticalLayout.addWidget(self.label) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.lineEdit = QtGui.QLineEdit(TPayne_MySQL_Tool) self.lineEdit.setObjectName(_fromUtf8("lineEdit")) self.horizontalLayout.addWidget(self.lineEdit) self.commitButton = QtGui.QPushButton(TPayne_MySQL_Tool) self.commitButton.setObjectName(_fromUtf8("commitButton")) self.horizontalLayout.addWidget(self.commitButton) self.verticalLayout.addLayout(self.horizontalLayout) self.treeWidget = QtGui.QTreeWidget(TPayne_MySQL_Tool) self.treeWidget.setObjectName(_fromUtf8("treeWidget")) self.verticalLayout.addWidget(self.treeWidget) self.verticalLayout_2.addLayout(self.verticalLayout) self.retranslateUi(TPayne_MySQL_Tool) QtCore.QMetaObject.connectSlotsByName(TPayne_MySQL_Tool)
Example #30
Source File: DB_UI.py From LLP_026_MySQL_PyQt_Example with GNU General Public License v2.0 | 5 votes |
def setupUi(self, TPayne_MySQL_Tool): TPayne_MySQL_Tool.setObjectName(_fromUtf8("TPayne_MySQL_Tool")) TPayne_MySQL_Tool.resize(457, 235) self.verticalLayout_2 = QtGui.QVBoxLayout(TPayne_MySQL_Tool) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.verticalLayout = QtGui.QVBoxLayout() self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.label = QtGui.QLabel(TPayne_MySQL_Tool) font = QtGui.QFont() font.setPointSize(20) self.label.setFont(font) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName(_fromUtf8("label")) self.verticalLayout.addWidget(self.label) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.lineEdit = QtGui.QLineEdit(TPayne_MySQL_Tool) self.lineEdit.setObjectName(_fromUtf8("lineEdit")) self.horizontalLayout.addWidget(self.lineEdit) self.commitButton = QtGui.QPushButton(TPayne_MySQL_Tool) self.commitButton.setObjectName(_fromUtf8("commitButton")) self.horizontalLayout.addWidget(self.commitButton) self.verticalLayout.addLayout(self.horizontalLayout) self.treeWidget = QtGui.QTreeWidget(TPayne_MySQL_Tool) self.treeWidget.setObjectName(_fromUtf8("treeWidget")) item_0 = QtGui.QTreeWidgetItem(self.treeWidget) item_0 = QtGui.QTreeWidgetItem(self.treeWidget) self.verticalLayout.addWidget(self.treeWidget) self.verticalLayout_2.addLayout(self.verticalLayout) self.retranslateUi(TPayne_MySQL_Tool) QtCore.QMetaObject.connectSlotsByName(TPayne_MySQL_Tool)