PyCharm + pyqt5 - Does not produce window

I have PyQT5 installed and Python 3.8.  Running a simple application that just creates the main window works fine when executed from a command prompt.  If executed from PyCharm the main window does not appear.  Have searched around and found nothing.  Can anyone give me an idea of where to look?  

When I run the application in PyCharm no window appears.  When I hit the stop icon I get the message:

Process finished with exit code -1

Thanks for any help

Tom

 

 

0
5 comments

Does the same problem appear if you run your code from the PyCharm's Terminal?

What's your PyCharm version?

0

Sergey, thank you for responding.  Yes, it runs from the terminal and from a stand-alone command prompt.  It does not run if I hit the execute icon in the IDE.  I also noticed that if I set a breakpoint, and hit the debug icon, an error message appears "Connection to Python debugger failed".  

PyCharm version 2019.3.1

Thanks for the help!

0

I figured it out and all working now!  I didn't have the script set up correctly in the Run Configuration.  After looking more closely at the message that appeared when I ran the debugger, and some research, I realized my beginner mistake.

0
Avatar
Permanently deleted user

Hi Tekaib,

could you kindly tell me how you've solved the issue. For a very basic code, Pycharm opens the window but if I add any clicked.connect code, pycharm doesnt load the window at all. I'd really like to know your input on this issue.

Thanks

0

N R G Rao

In the configuration for your project make sure you have the "Script path" set up to point to your executable.

 

0

Please sign in to leave a comment.