Python Forum
[PyQt] App crashes when reopening a subwindow
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] App crashes when reopening a subwindow
#2
(Aug-03-2021, 01:58 AM)JayCee Wrote:
        self.mdiArea = QtWidgets.QMdiArea()
        self.mdiArea.setGeometry(0, 0, 600, 400)
        self.mdiArea.setAutoFillBackground(True)
        self.mdiArea.setObjectName("mdiArea")
  
        self.subWindowUsers = QtWidgets.QWidget()
        self.subWindowUsers.setMinimumSize(QtCore.QSize(466, 267))
        self.subWindowUsers.setObjectName("subWindowUsers")

    def OpenUserForm(self, text):
        self.mdiArea.addSubWindow(ui.subWindowUsers)
        ui.subWindowUsers.setWindowTitle(text)
        ui.subWindowUsers.show()

What does it give as an error?

where is the " self "... I guess it might be because you didn't specify this on the bottom line on the side I cut out... I didn't have a chance to test your code, I'm just making a guess.
Reply


Messages In This Thread
App crashes when reopening a subwindow - by JayCee - Aug-03-2021, 01:58 AM
RE: App crashes when reopening a subwindow - by JokerSob - Aug-03-2021, 02:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  GUI crashes flash77 3 1,086 Jul-26-2023, 05:09 PM
Last Post: flash77
  [Tkinter] Clicking on the button crashes the TK window ODOshmockenberg 1 2,355 Mar-10-2022, 05:18 PM
Last Post: deanhystad
  [PyQt] Subwindow catlessness 5 2,987 Oct-23-2021, 06:28 PM
Last Post: catlessness
  [PyQt] Can't neither setWindowFlags nor setFixedSize of a subwindow. JayCee 10 4,380 Aug-06-2021, 08:06 PM
Last Post: JayCee
  Running external Python file as a subwindow JayCee 13 4,188 Aug-05-2021, 05:47 AM
Last Post: ndc85430
  [PyGUI] My GUI crashes after command MLGpotato 1 1,996 Feb-21-2021, 03:17 PM
Last Post: deanhystad
  [PyQt] PyQT5 Thread crashes after a while Suresh 0 2,077 Jul-21-2020, 07:53 AM
Last Post: Suresh
  PyQt5 : Interpreter Crashes While Initializing Message Box iMuny 7 6,034 Aug-29-2019, 01:38 PM
Last Post: iMuny

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020