It looks like showFullscreen() and showNormal() have different effects
-
I want to make a control that can double click on the full screen, and then double click to restore the original.showFullscreen() can be full screen, but showNormal() does not bring it back, it becomes a separate window.fullscreen works 100% ,but getting back to normal widget embedded in another widget ends with flying widget not docked in it's previous location.
if event_type == event.MouseButtonDblClick and watched == self.ui.label_photo: if not flag: self.ui.label_photo.setWindowFlag(Qt.Window) self.ui.label_photo.showFullScreen() flag = True else: self.ui.label_photo.setWindowFlag(Qt.SubWindow) self.ui.label_photo.showNormal() flag = False
normal
now
-
I want to make a control that can double click on the full screen, and then double click to restore the original.showFullscreen() can be full screen, but showNormal() does not bring it back, it becomes a separate window.fullscreen works 100% ,but getting back to normal widget embedded in another widget ends with flying widget not docked in it's previous location.
if event_type == event.MouseButtonDblClick and watched == self.ui.label_photo: if not flag: self.ui.label_photo.setWindowFlag(Qt.Window) self.ui.label_photo.showFullScreen() flag = True else: self.ui.label_photo.setWindowFlag(Qt.SubWindow) self.ui.label_photo.showNormal() flag = False
normal
now
@lionelM said in It looks like showFullscreen() and showNormal() have different effects:
self.ui.label_photo.setWindowFlag(Qt.SubWindow)
self.ui.label_photo.showNormal()My guess is: you need to put self.ui.label_photo back to its parent (set the parent again?) and add to parents layout.
-
@lionelM said in It looks like showFullscreen() and showNormal() have different effects:
self.ui.label_photo.setWindowFlag(Qt.SubWindow)
self.ui.label_photo.showNormal()My guess is: you need to put self.ui.label_photo back to its parent (set the parent again?) and add to parents layout.