- more changes due of porting to PyQt6

- fixed the Autocompleter highlighting to work in PyQt6
This commit is contained in:
Marius Stanciu
2021-08-07 10:21:45 +03:00
committed by Marius
parent 03618172d7
commit 3c06280d3d
11 changed files with 100 additions and 55 deletions

View File

@@ -136,7 +136,7 @@ class DocumentObject(FlatCAMObj):
# self.document_editor_tab.handleTextChanged()
self.ser_attrs = ['options', 'kind', 'source_file']
if Qt.mightBeRichText(self.source_file):
if QtGui.Qt.mightBeRichText(self.source_file):
# self.document_editor_tab.code_editor.setHtml(self.source_file)
self.document_editor_tab.load_text(self.source_file, move_to_start=True, clear_text=True, as_html=True)
else:
@@ -245,10 +245,10 @@ class DocumentObject(FlatCAMObj):
def on_bold_button(self):
if self.ui.font_bold_tb.isChecked():
self.document_editor_tab.code_editor.setFontWeight(QtGui.QFont.Bold)
self.document_editor_tab.code_editor.setFontWeight(QtGui.QFont.Weight.Bold)
self.font_bold = True
else:
self.document_editor_tab.code_editor.setFontWeight(QtGui.QFont.Normal)
self.document_editor_tab.code_editor.setFontWeight(QtGui.QFont.Weight.Normal)
self.font_bold = False
def on_italic_button(self):