PyQt : Open Other Window When Button Clicked.

  Рет қаралды 163,484

Ssj6

Ssj6

Күн бұрын

Пікірлер: 208
@julianmeier5235
@julianmeier5235 3 жыл бұрын
Made my day and propably saved me hours of looking through Stack Overflow
4 жыл бұрын
Honestly, I don't even know how to thank you. Thank you! I had been racking my brain for hours without realizing that the solution would be less complicated than I thought.
@joziahjamir4604
@joziahjamir4604 3 жыл бұрын
pro trick: you can watch movies at kaldrostream. Me and my gf have been using them for watching a lot of movies lately.
@quintonayaan4440
@quintonayaan4440 3 жыл бұрын
@Joziah Jamir Definitely, have been using Kaldrostream for since november myself :D
@CoreTech951
@CoreTech951 4 жыл бұрын
Thank you so much, this video is ABSOLUTE GOLD! I've been working on my programming project for university (sort of a mechanical engineering toolbox app with all sorts of tools that make work easier) and I've been stuck on multiple window problem for 6 hours with no success, until I've found your video. Now everything is working perfectly and I can run another module within the parent window :D Thanks again mate, you are a life-saver! I have subscribed to your channel too, you have a lot of useful stuff on there.
@ajaysatbhadre9090
@ajaysatbhadre9090 4 жыл бұрын
Thanks!
@michaelbutler6561
@michaelbutler6561 4 жыл бұрын
Great how-to. I had figured out how to pop up a message box but getting a new window open that I could actually do something in other than pass a message was difficult to figure out. Thanks a bunch.
@OtherRath
@OtherRath 4 жыл бұрын
This saved me hours of work of getting the Qt Designer code of 5 windows in one file. Awesome.
@sangwanizyambo7431
@sangwanizyambo7431 3 жыл бұрын
Thanks for the simple yet working solution! I'd spent hours trying to figure out how to implement it.
@Jeremyfto2
@Jeremyfto2 5 жыл бұрын
You my sir are a genius! I have legit been looking for 3 hours trying to figure out how to close a application and open up another one and you literally solved my problem! Thanks a lot
@amarshukla
@amarshukla 5 жыл бұрын
Very helpful for PyQT beginners. Thanks you!
@tahep3906
@tahep3906 5 жыл бұрын
it turned out to be simpler than I expected, thanks a lot for this helpful tutorial
@Laotsu87
@Laotsu87 2 жыл бұрын
An afternoon of looking things up. This video made it easy.
@abdurrazzak1612
@abdurrazzak1612 Жыл бұрын
Thank you very much for such a simple explanation and sharing your knowledge with us.
@giannisrallis5526
@giannisrallis5526 5 жыл бұрын
I lost one day fixing this problem and you saved me at last!!! Thanx
@utayasurian419
@utayasurian419 4 жыл бұрын
Thank you very much, you solved my biggest fear in just 10 minutes...
@utayasurian419
@utayasurian419 4 жыл бұрын
hi, i created a back button in new window and next button in main window. After i clicked next button to show new window, it was successfully hide the current main window but when i clicked back button on the new window, the application automatically closes itself. Any idea?
@aakashghole3007
@aakashghole3007 4 жыл бұрын
Thank you very very much for this video. You have cleared my concepts of opening new windows in python thanks a lot
@meriemalahmadihammou6073
@meriemalahmadihammou6073 3 жыл бұрын
Thank you for this wonderfull video..it was very helpfull
@lucienkahozi3314
@lucienkahozi3314 2 жыл бұрын
I like the way you say "other window"😀 thank you
@sarimbinwaseem
@sarimbinwaseem 4 жыл бұрын
Oh Great... Really simple and Great... I was looking it for quiet sometime and all forums are just not working for me...but this video works...
@AliKhandi
@AliKhandi 4 жыл бұрын
very useful tutorial, solve my problem after hours on searching. thank you
@nimishpadal973
@nimishpadal973 3 жыл бұрын
Thank you so much! Much helpful.
@olexandrpoberezhniak1283
@olexandrpoberezhniak1283 4 жыл бұрын
Кто ещё смотрит Индуса, не найдя русского адекватного контента - лайк на этот коммент. Посмотрим сколько нас.
@fayazmirani16
@fayazmirani16 3 жыл бұрын
Thanks for giving such a lot information
@Mike4Lifexx
@Mike4Lifexx 5 жыл бұрын
Thank you for the video, it was very helpful.
@BitsOfBoris
@BitsOfBoris 6 жыл бұрын
Hello :D I was struggling so bad with that, while I just needed the bit of code and to understand where to implement it :D Thanks a lot !
@vigneshwaran716
@vigneshwaran716 2 жыл бұрын
How to go back to main window after opening second window (main window is hidden)
@michanisani
@michanisani 6 жыл бұрын
Thanks. How can I return from other windows back to main windows when I close it ?
@mihaitza76
@mihaitza76 3 жыл бұрын
Fantastic! Great work, thanks.
@sergey5551
@sergey5551 3 жыл бұрын
EXACTLY what I need! thank you!
@alikadhim5472
@alikadhim5472 6 жыл бұрын
Excellent! Thank you for the wonderful explanation and for providing the files.
@peteradeyemo1093
@peteradeyemo1093 4 жыл бұрын
Waoh wonderful I love this channel thanks Ajay
@TechAddictGuy
@TechAddictGuy 3 жыл бұрын
Thanks..exactly what I was looking for
@SagarikaSengupta
@SagarikaSengupta 4 жыл бұрын
hi. can you please tell me the page that should open later is opening first? I took some reference from this tutorial and didn't do the exact one.
@olexandrpoberezhniak1283
@olexandrpoberezhniak1283 4 жыл бұрын
Thanks for this video, i`m guy from Ukraine, and i don`t find video-tutorial like this on russian KZbin
@23charitraagarwal56
@23charitraagarwal56 4 жыл бұрын
Bhai.. you saved me.. really.. I was messing around for solving this problem. And you came up with this.. Thank you very very much brother
@mmserty
@mmserty 4 жыл бұрын
Thanks, very big thanks
@mejorgabrielcandia
@mejorgabrielcandia 6 жыл бұрын
If you work directly with the ".iu" files like me, this works great! --------------------------------------------main------------------------------------------------ #2 files in folder "visual": Main.ui and frame.ui from PyQt5 import uic, QtWidgets from PyQt5.QtWidgets qtCreatorFile = "visual/Main.ui" #.ui MAIN WINDOW file name Ui_MainWindow, QtBaseClass = uic.loadUiType(qtCreatorFile) qtCreatorFile = "visual/frame.ui" #.ui SECOND WINDOW file name Ui_Frame, QtBaseClass2 = uic.loadUiType(qtCreatorFile) class MyMain(QtWidgets.QMainWindow, Ui_MainWindow): def __init__(self): QtWidgets.QMainWindow.__init__(self) Ui_MainWindow.__init__(self) self.setupUi(self) #here you config the button and call "openFrame" def openFrame(self): self.window = QtWidgets.QFrame() self.ui = Ui_Frame() self.ui.setupUi(self.window) self.window.show() if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) window = MyApp() window.setWindowTitle("IA - Clustering Jerárquico") window.show() sys.exit(app.exec_()) --------------------------------------------------------------------------------------------- that's it!
@cookiekoekje648
@cookiekoekje648 6 жыл бұрын
Thank you *SO MUCH*! You're the only person on the entire internet to have a tutorial on this. I'm so thankful!
@sahiljain7871
@sahiljain7871 6 жыл бұрын
kzbin.info/www/bejne/fZ_aqZ-jobVnj7M
@nayankumarshit7522
@nayankumarshit7522 5 жыл бұрын
Thank you sir. you solved my problems
@marcocaimmi3919
@marcocaimmi3919 6 жыл бұрын
I have QDialog window instead of 2 QMainWindow. I made the the changes you indicated. Th eprogramis not working and I get the following error: "setupUi() missing 1 required positional argument: OterWindow.it is like setupUi needs two arguments and i passed only one as you did "self.window). Can you help me? Thanks!
@akp_04
@akp_04 4 жыл бұрын
such an easy solution..thanks!
@suvabratamukherjee1461
@suvabratamukherjee1461 3 жыл бұрын
Thanks lot..it was really helpful
@deepakkakade2979
@deepakkakade2979 4 жыл бұрын
How to avoid opening same sub window twice? Can we check if it is already opened in pyqt5?
@johntaggart4136
@johntaggart4136 5 жыл бұрын
Great tutorial. Thank you.
@callmemk2460
@callmemk2460 3 жыл бұрын
This really made me understand how to work this out Thanks: )
@Айскрим-р4е
@Айскрим-р4е 4 жыл бұрын
Thanks for your videos
@kaoutherelhamdi8054
@kaoutherelhamdi8054 4 жыл бұрын
You are genius !!! I do appreciate your video you really helped me !!! Thanks .
@juleswinnfield1437
@juleswinnfield1437 6 жыл бұрын
How can I make the buttons in the newly opened window work? They're unresponsive. The code is reached, but the buttons do not work?
@gabrielaascenciovalencia6534
@gabrielaascenciovalencia6534 5 жыл бұрын
Could you tell me what the code would be like to make it return to the main screen with a button, I am designing an interface with many options in this case I want you to return to the main screen, I am new to this but I want to turn on you could help me.
@ahmedlimam2241
@ahmedlimam2241 4 жыл бұрын
Thank you so much
@issamboukhris161
@issamboukhris161 4 жыл бұрын
Thank you very much my friend !
@aaronwolf4620
@aaronwolf4620 4 жыл бұрын
Hey, thx for the help This was gold Sadly I have still a problem I can go back and forward, but if I do that more then 1 time, the windows close Does sb know how to handle this?
@tonygaupo
@tonygaupo 6 жыл бұрын
Hi! Your video helped me. Just a question, after the otherwindow popped up, id like a close button to close the other window (I created a button in otherwindow). How can i do that?
@tonibgood
@tonibgood 6 жыл бұрын
That's a good question. I have the same doubt indeed ...
@tonygaupo
@tonygaupo 6 жыл бұрын
I use this code. Ord_Search is the name of my form def close_ord_search_form(self): Ord_Search.close()
@amid6887
@amid6887 6 жыл бұрын
nice one but i didnot understand the last 2 lines of your openWindow(). the last 2 lines can be re-written as: MainWindow.hide() MainWindow.show() but, the question is: how the same variable is pointing to 2 different layouts? can you plz explain. i am new to py. thanks.
@brunomachado3863
@brunomachado3863 3 жыл бұрын
Thank you very much! I from Brazil
@juleswinnfield1437
@juleswinnfield1437 6 жыл бұрын
Oh my god. Just what I'd been looking for! Thanks so much for your help.
@sahiljain7871
@sahiljain7871 6 жыл бұрын
kzbin.info/www/bejne/fZ_aqZ-jobVnj7M
@excellencemichel4875
@excellencemichel4875 6 жыл бұрын
Thank you very much the video. Only do not work because the variable does not exist in the class method. Don when we call the variable we are told it's not defined
@ashwiniashu3560
@ashwiniashu3560 2 жыл бұрын
how to calculate squares and cubes using pyqt?
@Santanu_Pal
@Santanu_Pal 4 жыл бұрын
Thanks a lot. so smart so simple.
@enginecompsecurity8398
@enginecompsecurity8398 5 жыл бұрын
Hi one question, if I have on application in pyqt and want run a script of gnuradio since my interface in pyqt, as I doing ?
@jainammehta6093
@jainammehta6093 4 жыл бұрын
Thank you so much man it was really helpful
@akmalhidayat6613
@akmalhidayat6613 3 жыл бұрын
you save my day...thanks
@gabriellaamelia1333
@gabriellaamelia1333 5 жыл бұрын
thank you for the explanation
@azmathayat1304
@azmathayat1304 4 жыл бұрын
Hi i have done in the same way. I have three window, main window.py, employeesignup.py and Qdialog.... Thw code work fine when i move from main to employee second window but one i want to move from 2nd window to 3rd window Qdialog it does not work.... here is the function when i clcik in second window button to open 3rd window but it does not work. can you please help. print show result upto print::2 ihave also tried self.ui.retranslateUi(self, self.window) but nothing work self.window = QtWidgets.QDialog() self.ui = Ui_Dialog() print("2") self.ui.setupUi(self.window) print("3") self.window.show() looking for help. Thanks
@scumbagjay5467
@scumbagjay5467 6 жыл бұрын
Thank you for this tutorial! I have a question, if I open other window when i clicked a button. a new button pops out. but I tried to open a new window from the one that pops out but I get a error. Window -> new window -> new window. how can you do that sir? TY. please reply.
@valentindragin7653
@valentindragin7653 5 жыл бұрын
Hello. I'm having the same problem at the moment. Have you found any solutions ever since you asked the question?
@SoumilShah
@SoumilShah 5 жыл бұрын
@@valentindragin7653 same issues any solutions?
@QuangLe-zc7et
@QuangLe-zc7et 6 жыл бұрын
Thanks for share but i have a question. Can you help me answer ? I have 2 file : MainWindow.py and CreateUser.Py. In MainWindow, if i press "Add User" button the CreateUser Dialog will appear. And in CreateUser Dialog, If i press "OK" or "Cancel" button the CreateUser Dialog will appear. Like you, i just using "Dialog.hide()". But the problem is on MainWindow.py , i import CreateUser.Py like this : "from CreateUser import Ui_Dialog". When i click "OK" or "Cancel" button. This error is show up : Dialog.hide() NameError: global name 'Dialog' is not defined So i think i must define an agrument for MainWindow.py what is Dialog. But i don't know how to do that ? Please tell me if you know. Many Thanks!
@cgbcharlie1234
@cgbcharlie1234 3 жыл бұрын
thank you so much my program works now!
@silpisingha8140
@silpisingha8140 4 жыл бұрын
Great tutorial helpe me a lot Keep it up
@ajaysatbhadre9090
@ajaysatbhadre9090 4 жыл бұрын
Thanks!
@rvmaths981
@rvmaths981 6 жыл бұрын
Thanks sir But i got a doubt If i try to implement this problem for 3 consecutive windows it doesn't work Need help for the same
@sarveshrayter7667
@sarveshrayter7667 6 жыл бұрын
Hey did you find the solution? I am struggling with the same problem
@rvmaths981
@rvmaths981 6 жыл бұрын
@@sarveshrayter7667 no sir I could not
@valentindragin7653
@valentindragin7653 5 жыл бұрын
@@rvmaths981 The same problem. Have you found anything?
@valentindragin7653
@valentindragin7653 5 жыл бұрын
@@sarveshrayter7667 Have you found any solution ever since? I happen to have the same problem
@charon3376
@charon3376 2 жыл бұрын
thank you so much maan, u saved alot of my time .. New subscriber !!!
@Atonix99
@Atonix99 2 жыл бұрын
Not working. It says that the name openWindow is not defined!
@mymails5968
@mymails5968 4 жыл бұрын
Thank You, How to return from OtherWindow to MainWindow?
@RajaKumar-jy2nb
@RajaKumar-jy2nb 4 жыл бұрын
Thankx
@gouthamkumar102
@gouthamkumar102 5 жыл бұрын
what if i want to pass some variable data from other window to main window and close the other window on button click
@emmanuelsheshi1553
@emmanuelsheshi1553 5 жыл бұрын
python boo has a great video on this subject
@ajaysatbhadre9090
@ajaysatbhadre9090 5 жыл бұрын
Watch my new video on this topic. kzbin.info/www/bejne/q2Klp4Svobh8pZo
@9sufian
@9sufian 5 жыл бұрын
Thank you, you helped me a lot.
6 жыл бұрын
'"C:\Python35\python"' is not recognized as an internal or external command, operable program or batch file.
@sanjaythumma7537
@sanjaythumma7537 6 жыл бұрын
Same here.. I need help
@ruminantdernegi3127
@ruminantdernegi3127 5 жыл бұрын
so right click MainWindow and execute with python then
@acanim1202
@acanim1202 5 жыл бұрын
Thx, bro, your tutorial helping me, goodluck.
@padinmangesa7296
@padinmangesa7296 4 жыл бұрын
From indonesia Thanks a lot, that works
@alvinlorejas2687
@alvinlorejas2687 4 жыл бұрын
thank you sir!
@iomerkhan2947
@iomerkhan2947 4 жыл бұрын
thank u soo much helped alot
@tayjen59
@tayjen59 4 жыл бұрын
The best tutorial in the world!
@VuLe
@VuLe 4 жыл бұрын
Thankyou so much.
@SoumilShah
@SoumilShah 5 жыл бұрын
great thanks a lot great tutorial
@jaimebaez326
@jaimebaez326 3 жыл бұрын
ty, i love this, i have a bug when i try to open another window in the new window but idk, at least i can do one change
@darkaria88
@darkaria88 4 жыл бұрын
So what if I want to open a 3rd window from the 2nd window. It gives error when attempting to hide window Main_Window is not defined....... Is no one else getting this message?
@kaii7075
@kaii7075 4 жыл бұрын
I guess you should put the code on the script of the 2nd window to avoid the error
@affankaangungor2719
@affankaangungor2719 4 жыл бұрын
Thank U very very much ! U helped me alot thanks again🙂
@itgroup4243
@itgroup4243 4 жыл бұрын
thank's a lot
@oriagina8053
@oriagina8053 3 жыл бұрын
hello Ssj6, thanks for your videos that so simple and usefull. but i have problem, in my second window i have function. but when i open main to second that function connot run. could you help me?
@maedehshahabi4744
@maedehshahabi4744 4 жыл бұрын
Really Thanks!
@redValky
@redValky 4 жыл бұрын
thanks bro. I was working on a project and this helped me so much. THANK YOU bhaaaaaaaiiiiiii
@abhaybhadouriya1340
@abhaybhadouriya1340 5 жыл бұрын
thank you,you helped me a lot.
@haswanthaekula7656
@haswanthaekula7656 5 жыл бұрын
How do i go back from other window to main window when i close the other window if the main window is hidden? Thanks!
@SoumilShah
@SoumilShah 5 жыл бұрын
i am running into same issue did you find any solutions ?
@luiscarlospallaresascanio2374
@luiscarlospallaresascanio2374 6 жыл бұрын
Gracias,estaba buscando como hacerlo,no entiendo el idioma pero es entendible la forma como lo haces.
@DanielkPhotography
@DanielkPhotography 7 жыл бұрын
Thank you for these awesome tutorials. In each tutorial you add code into the file created by pyuic4 or pyuic5. If one changes something in the gui, one needs to reuse pyuic4. All the added code is lost when working like this. Could you show how to create a new python file and import all the gui-classes and make a buttonclick react the same way? Thanks!
@ajaysatbhadre9090
@ajaysatbhadre9090 7 жыл бұрын
Daniel k Ok ! I will create another video for you!
@DanielkPhotography
@DanielkPhotography 7 жыл бұрын
Thanks!
@Sunshineshaurya
@Sunshineshaurya 6 жыл бұрын
Daniel k Hi Daniel! Did you find an answer to your question because I am trying a similar thing.
@Schadowshame
@Schadowshame 6 жыл бұрын
not sure if you still need this, but you could try to create an instance of the mainwindow in a new class, where you then connect the buttons, something like this: from MainWindow import Ui_MainWindow class Controller() def __init__(self): self.main_window = MainWindow() self.main_ui = Ui_MainWIndow() self.main_ui.setupUi(self.main_window) self.connect_buttons() self.main_window.show() def connect_buttons(self): self.main_ui.button_XYZ.connect(self.DoSomething) ....... def doSomething(self): ........ if __name__ =="__main__": app = QApplication(sys.argv) controller = Controller() sys.exit(app.exec())
@DanielkPhotography
@DanielkPhotography 6 жыл бұрын
There's a great example on: kzbin.info/www/bejne/jJrKhoB3m6plp5Y
@Synergy_Jxyy
@Synergy_Jxyy 10 ай бұрын
Thank you
@valentindragin7653
@valentindragin7653 5 жыл бұрын
Hello! Great video. Really helpful. But when I was trying to implement the information that you give in this video I ran into a problem. Could you help me out? Right now I'm working on the prototype of an interactive test for pupils. This prototype has 4 windows: 'welcome' window; 'question1'; 'question2' and 'results'. I use python 3.7; pyqt5 and Qt Designer. For the last couple of days I've been searching through a lot of information to find the way how to assemble a GUI which would consist out of many windows that are called one by one when certain buttons in the windows are pushed. I managed to find only a couple of examples but these programs do not go beyond 2 windows. And that's when I came across my problem. I want the program to display 'welcome' window, then when the only button 'start the test' is pushed I want it to pass on to the first question which this program already does. But when I want to move on from 'question1' to 'question2' by pushing 'nextQuestion' this is when it crashes. It says 'question1' is not defined. When I start the program directly by runing the file 'question1' it does get to the 2nd question but when the 'goToTheResults' button is pushed it crashes again. In this case it says 'question2' is not defined. I wonder what the possible solution might be
@yamatouchiha1245
@yamatouchiha1245 5 жыл бұрын
Hello, how do i add code to the push buttons. Thanks in advance
@AliKhandi
@AliKhandi 4 жыл бұрын
how can I close previous window after click??
@Folka548
@Folka548 4 ай бұрын
thank u bro:) still helpful
@flavio4923
@flavio4923 2 жыл бұрын
Omg, thank you!
@V12-y5b
@V12-y5b 5 жыл бұрын
Thanks man , really appreciate your efforts , it will help me to save a lot of time , keep up the good work .
@alessandrotozzi8729
@alessandrotozzi8729 6 жыл бұрын
Hi thanks for the video, can you show me how close/hide the preview window when I open another?
QtDesigner and PyQt5:  The right and wrong way to use them together
37:16
Alan D Moore Codes
Рет қаралды 108 М.
Master PyQt5 part 5: Moving data between windows
18:46
Alan D Moore Codes
Рет қаралды 20 М.
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 90 МЛН
Mom had to stand up for the whole family!❤️😍😁
00:39
How to pass data from one window to another | PyQt5 Tutorial
7:20
PyQt5 Tutorial - MenuBar (Shortcuts, Status Bar and Triggers)
11:23
Tech With Tim
Рет қаралды 255 М.
PyQt5 Tutorial - How to Use Qt Designer
10:53
Tech With Tim
Рет қаралды 810 М.
Multiple Screens in PyQt5: Switch screens without opening a new window
11:43
Code First with Hala
Рет қаралды 95 М.
PyQt5 Tutorial - Buttons and Events (Signals)
9:58
Tech With Tim
Рет қаралды 386 М.