def popup_editor ( self ): """ Invokes the pop-up editor for an object facet. """ fnt, ok = QFontDialog.getFont( self.factory.to_qt_font( self ), self.control ) if ok: self.value = self.factory.from_qt_font( fnt ) self.update_editor()
def font_pushButton_clicked_slot(self): font_name, font_size = self.font_pushButton.text().split(' | ') font_size = int(font_size) font, respose = QFontDialog.getFont( QFont(font_name, font_size), self.main_window) if respose: font_label = '%s | %d' % ( font.family(), font.pointSize()) self.font_pushButton.setText(font_label)
def fontChange(self): (font, ok) = QFontDialog.getFont(QFont("Helvetica [Cronyx]", 10), self) if ok: self.textEdit.setCurrentFont(font)