Skip to content

Commit

Permalink
Merge pull request #417 from dalthviz/spyder_12210
Browse files Browse the repository at this point in the history
Replace misuses of QtGui
  • Loading branch information
ccordoba12 committed Apr 8, 2020
2 parents 4148456 + c1a9761 commit e4034b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions qtconsole/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ def create_tab_with_new_frontend(self):
def set_window_title(self):
"""Set the title of the console window"""
old_title = self.windowTitle()
title, ok = QtGui.QInputDialog.getText(self,
"Rename Window",
"New title:",
text=old_title)
title, ok = QtWidgets.QInputDialog.getText(self,
"Rename Window",
"New title:",
text=old_title)
if ok:
self.setWindowTitle(title)

Expand Down Expand Up @@ -151,10 +151,10 @@ def create_tab_with_current_kernel(self):
def set_tab_title(self):
"""Set the title of the current tab"""
old_title = self.tab_widget.tabText(self.tab_widget.currentIndex())
title, ok = QtGui.QInputDialog.getText(self,
"Rename Tab",
"New title:",
text=old_title)
title, ok = QtWidgets.QInputDialog.getText(self,
"Rename Tab",
"New title:",
text=old_title)
if ok:
self.tab_widget.setTabText(self.tab_widget.currentIndex(), title)

Expand Down
8 changes: 4 additions & 4 deletions qtconsole/rich_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import os
import re

from qtpy import QtGui, QtWidgets
from qtpy import QtWidgets

from ipython_genutils import py3compat

Expand Down Expand Up @@ -75,13 +75,13 @@ def export(self):
# If there are PNGs, decide how to export them.
inline = self.inline_png
if inline is None and IMG_RE.search(html):
dialog = QtGui.QDialog(parent)
dialog = QtWidgets.QDialog(parent)
dialog.setWindowTitle('Save as...')
layout = QtGui.QVBoxLayout(dialog)
layout = QtWidgets.QVBoxLayout(dialog)
msg = "Exporting HTML with PNGs"
info = "Would you like inline PNGs (single large html " \
"file) or external image files?"
checkbox = QtGui.QCheckBox("&Don't ask again")
checkbox = QtWidgets.QCheckBox("&Don't ask again")
checkbox.setShortcut('D')
ib = QtWidgets.QPushButton("&Inline")
ib.setShortcut('I')
Expand Down

0 comments on commit e4034b2

Please sign in to comment.