Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update use of obsolete features in Qt5 #123

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions openmc_plotter/overlays.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,18 @@ def set_cells(self):
for menu in self.shortcuts:
# set menu header
header_item = self.tableWidget.item(row_idx, col_idx)
header_item.setTextColor(QtGui.QColor(150, 150, 150, 255))
header_item.setForeground(QtGui.QColor(150, 150, 150, 255))
header_item.setText(menu)
header_item.setFlags(QtCore.Qt.NoItemFlags)
row_idx += 1

for shortcut in self.shortcuts[menu]:
desc_item = self.tableWidget.item(row_idx, col_idx)
desc_item.setTextColor(self.textPenColor)
desc_item.setForeground(self.textPenColor)
desc_item.setText(shortcut[0])

key_item = self.tableWidget.item(row_idx, col_idx + 1)
key_item.setTextColor(self.textPenColor)
key_item.setForeground(self.textPenColor)
key_item.setText(shortcut[1])
row_idx += 1
# update for next menu
Expand Down
2 changes: 1 addition & 1 deletion openmc_plotter/plotgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def updatePixmap(self):

cv = self.model.currentView
# set figure bg color to match window
window_bg = self.parent.palette().color(QtGui.QPalette.Background)
window_bg = self.parent.palette().color(QtGui.QPalette.Window)
self.figure.patch.set_facecolor(rgb_normalize(window_bg.getRgb()))

# set data extents for automatic reporting of pointer location
Expand Down
2 changes: 1 addition & 1 deletion openmc_plotter/plotmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,7 @@ def data(self, index, role=Qt.DisplayRole):
else:
return int(Qt.AlignLeft | Qt.AlignVCenter)

elif role == Qt.BackgroundColorRole:
elif role == Qt.BackgroundRole:
color = domain.color
if column == COLOR:
if isinstance(color, tuple):
Expand Down
Loading