10 import re |
10 import re |
11 import time |
11 import time |
12 import os |
12 import os |
13 import functools |
13 import functools |
14 |
14 |
15 from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QPoint, QEvent |
15 from PyQt6.QtCore import pyqtSlot, pyqtSignal, Qt, QPoint, QEvent |
16 from PyQt5.QtGui import QColor, QKeySequence, QTextCursor, QBrush, QClipboard |
16 from PyQt6.QtGui import QColor, QKeySequence, QTextCursor, QBrush, QClipboard |
17 from PyQt5.QtWidgets import ( |
17 from PyQt6.QtWidgets import ( |
18 QWidget, QMenu, QApplication, QHBoxLayout, QSpacerItem, QSizePolicy, |
18 QWidget, QMenu, QApplication, QHBoxLayout, QSpacerItem, QSizePolicy, |
19 QTextEdit, QToolButton, QDialog |
19 QTextEdit, QToolButton, QDialog |
20 ) |
20 ) |
21 |
21 |
22 from E5Gui.E5ZoomWidget import E5ZoomWidget |
22 from E5Gui.E5ZoomWidget import E5ZoomWidget |
774 while tc.movePosition(QTextCursor.MoveOperation.Down): |
774 while tc.movePosition(QTextCursor.MoveOperation.Down): |
775 pass |
775 pass |
776 |
776 |
777 # set the font |
777 # set the font |
778 charFormat = tc.charFormat() |
778 charFormat = tc.charFormat() |
779 charFormat.setFontFamily(self.__font.family()) |
779 charFormat.setFontFamilies([self.__font.family()]) |
780 charFormat.setFontPointSize(self.__font.pointSize()) |
780 charFormat.setFontPointSize(self.__font.pointSize()) |
781 tc.setCharFormat(charFormat) |
781 tc.setCharFormat(charFormat) |
782 |
782 |
783 index = 0 |
783 index = 0 |
784 while index < len(data): |
784 while index < len(data): |