Pyqt - Hide Mainwindow And Show Qdialog Without The Taskbar Icon Disappearing
I've been using the code from this example PyQt: How to hide QMainWindow: class Dialog_02(QtGui.QMainWindow): def __init__(self, parent): super(Dialog_02, self).__init_
Solution 1:
Just guessing (because I don't know what platform you're on, and I don't use a task-bar myself, so I cant really test it), but try getting rid of the parent:
class Dialog_02(QtGui.QMainWindow):
def __init__(self, other_window):
super(Dialog_02, self).__init__()
# ensure this window gets garbage-collected when closed
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
self._other_window = other_window
...
def closeAndReturn(self):
self.close()
self._other_window.show()
Post a Comment for "Pyqt - Hide Mainwindow And Show Qdialog Without The Taskbar Icon Disappearing"