Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8418753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:24:51+00:00 2026-06-10T02:24:51+00:00

I am dealing with 2 windows . One is created by Qt Designer and

  • 0

I am dealing with 2 windows . One is created by Qt Designer and i import it
on test.py program . what i did i make a Widget on the test program and
than add a button to it and on click event I try to popup the other
window(gui1.py) created by Qt Designer but it never pop ups and when i use
break and do line by line debugging it shows me this message after running
this command “myapp2 = MyForm()” on line number 35 test.py .

QCoreApplication::exec: The event loop is already running

and once i pressed enter on the terminal it pop up the other window .

I am confuse where i am wrong .

Thanks
test.py
gui1.py

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:24:53+00:00Added an answer on June 10, 2026 at 2:24 am

    The reason the other window doesn’t appear, is because you are not keeping a reference to it, and so it gets garbage-collected immediately after it is shown.

    To fix the problem, you could either store the window instance it as an attribute, or give it a parent:

    def local_manag(self):
        print "pressed"
        # store it as an attribute
        self.myapp2 = MyForm()
        self.myapp2.show()
        # or give it a parent
        # myapp2 = MyForm(self)
        # myapp2.show()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I had a simple program that was roughly click a button and it
I'm dealing with the OpenSLL error on windows, using omniauth. I've tried specifying the
Other questions dealing with use of match_parent pre 2.2 have answers stating one should
I have a Qt program with many buttons, user-interactable widgets, etc. At one stage
I have a problem dealing with Windows environment variables in a puppet (configuration management)
Say are dealing with a Windows network that for internet access must pass through
One of my co-workers is building a C# windows app that needs to grab
I'm wrapping the Windows API, and I wish to make error checking easy to
I compile C++ code with MinGW GCC on Windows. I'm currently dealing with a
I'm dealing with a .NET windows form application written in C#, using entity framework

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.