Skip to content

Commit

Permalink
More Qt5->Qt6 tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
greghope667 committed Apr 4, 2023
1 parent fcbc5c8 commit 2c7f162
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions plover/gui_qt/config_serial_widget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
</connection>
<connection>
<sender>baudrate</sender>
<signal>activated(QString)</signal>
<signal>textActivated(QString)</signal>
<receiver>SerialWidget</receiver>
<slot>on_baudrate_changed(QString)</slot>
<hints>
Expand All @@ -357,7 +357,7 @@
</connection>
<connection>
<sender>bytesize</sender>
<signal>activated(QString)</signal>
<signal>textActivated(QString)</signal>
<receiver>SerialWidget</receiver>
<slot>on_bytesize_changed(QString)</slot>
<hints>
Expand All @@ -373,7 +373,7 @@
</connection>
<connection>
<sender>parity</sender>
<signal>activated(QString)</signal>
<signal>textActivated(QString)</signal>
<receiver>SerialWidget</receiver>
<slot>on_parity_changed(QString)</slot>
<hints>
Expand Down Expand Up @@ -405,7 +405,7 @@
</connection>
<connection>
<sender>stopbits</sender>
<signal>activated(QString)</signal>
<signal>textActivated(QString)</signal>
<receiver>SerialWidget</receiver>
<slot>on_stopbits_changed(QString)</slot>
<hints>
Expand Down
2 changes: 1 addition & 1 deletion plover/gui_qt/dictionaries_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Qt,
pyqtSignal,
)
from PyQt6.QtGui import QCursor, QIcon
from PyQt6.QtGui import QCursor
from PyQt6.QtWidgets import (
QFileDialog,
QGroupBox,
Expand Down
5 changes: 2 additions & 3 deletions plover/gui_qt/dictionary_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
QModelIndex,
Qt,
)
from PyQt6.QtGui import QIcon
from PyQt6.QtWidgets import (
QComboBox,
QDialog,
Expand All @@ -22,7 +21,7 @@

from plover.gui_qt.dictionary_editor_ui import Ui_DictionaryEditor
from plover.gui_qt.steno_validator import StenoValidator
from plover.gui_qt.utils import ToolBar, WindowState
from plover.gui_qt.utils import ToolBar, WindowState, Icon


_COL_STENO, _COL_TRANS, _COL_DICT, _COL_COUNT = range(3 + 1)
Expand Down Expand Up @@ -65,7 +64,7 @@ class DictionaryItemModel(QAbstractTableModel):

def __init__(self, dictionary_list, sort_column, sort_order):
super().__init__()
self._error_icon = QIcon(':/dictionary_error.svg')
self._error_icon = Icon(':/dictionary_error.svg')
self._dictionary_list = dictionary_list
self._operations = []
self._entries = []
Expand Down
4 changes: 2 additions & 2 deletions plover/gui_qt/machine_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ def __init__(self):
self._details_frame_format.setForeground(foreground)
self._details_frame_format.setTopMargin(doc_margin)
self._details_frame_format.setBottomMargin(-3 * doc_margin)
self._details_frame_format.setBorderStyle(QTextFrameFormat.BorderStyle_Solid)
self._details_frame_format.setBorderStyle(QTextFrameFormat.BorderStyle.BorderStyle_Solid)
self._details_frame_format.setBorder(doc_margin / 2)
self._details_frame_format.setPadding(doc_margin)
self._details_list_format = QTextListFormat()
self._details_list_format.setStyle(QTextListFormat.ListSquare)
self._details_list_format.setStyle(QTextListFormat.Style.ListSquare)

def _format_port(self, index):
self._doc.clear()
Expand Down
2 changes: 1 addition & 1 deletion plover/gui_qt/suggestions_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def _save_state(self, settings):
font = self._get_font(name)
font_string = font.toString()
settings.setValue(name, font_string)
ontop = bool(self.windowFlags() & Qt.WindowStaysOnTopHint)
ontop = bool(self.windowFlags() & Qt.WindowType.WindowStaysOnTopHint)
settings.setValue('ontop', ontop)

def _show_suggestions(self, suggestion_list):
Expand Down

0 comments on commit 2c7f162

Please sign in to comment.