Pass Data Between Windows - PyQt5 GUI Thursdays #25

  Рет қаралды 28,797

Codemy.com

Codemy.com

Күн бұрын

In this video I'll show you how to pass data from one window to another with PyQT5 and Python!
Passing data from one window to another with PyQT5 is pretty easy.
In this video we'll type something into a box on one window, and then when we click a button - whatever we typed in the box will appear in the other window.
#pyqt5 #codemy #JohnElder
Timecodes
0:00​​ - Introduction
0:50 - Create GUI in PyQT5 Designer
3:12 - Convert UI files To Python
3:56 - Import Second File To Main Program
4:12 - Create Function To Open Second Window
5:46 - Create Function To Pass Data Between Windows
8:27 - Understanding Program Flow Between Windows
9:50 - Conclusion

Пікірлер: 31
@Codemycom
@Codemycom 3 жыл бұрын
▶️ Watch Entire PyQt5 GUI Thursdays Playlist ✅ Subscribe To My KZbin Channel: bit.ly/3sHT8dc bit.ly/2IGzvOR ▶️ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN ▶️ Get The Code: bit.ly/394NQ3R
@RyanDanielG
@RyanDanielG 2 жыл бұрын
great video! Feed the algorithm! It helps the creators of the videos we love
@Codemycom
@Codemycom 2 жыл бұрын
Thanks for that!
@abrarmulla1196
@abrarmulla1196 3 жыл бұрын
Less goooo Thanks for clearing all my doubts.
@Codemycom
@Codemycom 3 жыл бұрын
Sure thing
@codeKeshav
@codeKeshav 3 жыл бұрын
Thanks for using my suggestion about clicking on the widget to change the name or text.
@Codemycom
@Codemycom 3 жыл бұрын
:-p
@eduardozaratemontalvo6405
@eduardozaratemontalvo6405 Жыл бұрын
Thanks a lot..!! You made an awesome job..!! Keep going..!! :D You have a new subscriber.!! 🤘
@maxrichey5711
@maxrichey5711 2 жыл бұрын
I have really enjoyed your channel, John. Would you consider a PyQt5 tutorial where a TreeView is used to drag and drop image files into Labels and text files into TextEdits? That would be extremely useful; especially, if someone like you can cut through the online maze.
@WaleFolorunso
@WaleFolorunso 2 жыл бұрын
Great work. Your tutorials are awesome. How do i check if second window is opened before passing the data?
@shashvatsingh6812
@shashvatsingh6812 Жыл бұрын
It is normally at 3x. Haha. Great Content!
@kunrath
@kunrath 2 жыл бұрын
Hi John, I'm not sure where to ask this but I'll do it here. I've made a GUI to my program and converted the ui to py. Then I did some changes to the object names, and some values.. the question is: is there any way to 'convert' the '.py' back to '.ui' so I can have both equal in IDE and designer? thx in advance. I'm learning a lot from your videos, great job!
@sinacoder
@sinacoder 11 ай бұрын
Nice :)
@Codemycom
@Codemycom 11 ай бұрын
thanks
@abrarmulla1196
@abrarmulla1196 3 жыл бұрын
Lessss goooooooooooo
@Codemycom
@Codemycom 3 жыл бұрын
Ha!
@pdep
@pdep Жыл бұрын
If the second window was not open when text submitted, it doesn't show - but could you check second window exists as part of the submit method? If it does not, then run the open second window method first, then the submit method. Would that work? BTW I am finding it better practice to import the UI files rather than doing 'hard-coded' conversions. That way I can make any number of updates to the UI file without repeated conversions every time. [loadUi("foo.ui", self) ]
@integralofthederivative2744
@integralofthederivative2744 2 жыл бұрын
Hey i had a doubt. i want to input stuff in the second window and show it in a list widget in the first window how do i do that?
@jerryc5716
@jerryc5716 2 жыл бұрын
Did you ever figure it out? I'm wondering the same thing.
@integralofthederivative2744
@integralofthederivative2744 2 жыл бұрын
@@jerryc5716 a little Long story. I was making a clinic management software for my 12th grade CS Assessment. So that was for the list of patients. What I did was I used tabs so the refresh call could happen in one class. If you are using a database then you can try adding that data into the database and then put a reload option in the first one and feed the database into the list widget or table on click.
@RichSchupbach
@RichSchupbach Жыл бұрын
​@@jerryc5716 I also wanted to get information from the second window to the first window. I found a different video that does a good job of answering how. It is here: kzbin.info/www/bejne/rYDbq5uOZbahd9k
@StalkedByLosers
@StalkedByLosers 2 жыл бұрын
What about the other way? If we want the second window to send info to the main window?
@RichSchupbach
@RichSchupbach Жыл бұрын
I had the same question. I found a different video that does a good job of answering it. It is here: kzbin.info/www/bejne/rYDbq5uOZbahd9k
@MrEverydaynormalguy
@MrEverydaynormalguy 2 жыл бұрын
why are you not using load ui?
@songokussj4cz
@songokussj4cz 2 жыл бұрын
My thoughts exactly... And his answer would be "I'm simplifying things". For that, I would answer "Yeah, 99 % videos are simplifying things... How would you know how to use it in production if nobody shows you how to do it...". The second problem with this video is "how to pass information and then open window with the label changed. He told 9:39 "you can't change the window if you haven't shown the window yet, right?", well you can... Instantiate, edit, show...
@Izzat-bj1le
@Izzat-bj1le 3 жыл бұрын
Hell yeee , can u make this tutorial in kivyMd?
@Codemycom
@Codemycom 3 жыл бұрын
We'll see
@gagannagpal6687
@gagannagpal6687 3 жыл бұрын
why not use py creator, you wouldn't need to convert the ui files into python and it has it's own text editor so you can edit simultaneously, though to be honest sublime looks way better so I can see why lol. Also great tutorials!
@Codemycom
@Codemycom 3 жыл бұрын
because this is better
@MayankKumar-yx8dp
@MayankKumar-yx8dp 3 жыл бұрын
Can you Make tutorial on TornadoFx (Kotlin language)..?
@Codemycom
@Codemycom 3 жыл бұрын
No sorry, I have no idea what that is
Hide First Window From Second Window - PyQt5 GUI Thursdays #26
13:00
Master PyQt5 part 5: Moving data between windows
18:46
Alan D Moore Codes
Рет қаралды 20 М.
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 91 МЛН
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 119 МЛН
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 69 МЛН
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 49 МЛН
Working With Qt Designer's UI Files And PyQt
19:17
DistroTube
Рет қаралды 16 М.
How to Pass Data between Multiple Windows in Tkinter
18:19
CodersLegacy
Рет қаралды 27 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 392 М.
How To Open A Second Window - PyQt5 GUI Thursdays #24
13:41
Codemy.com
Рет қаралды 66 М.
How to pass data from one window to another | PyQt5 Tutorial
7:20
Working with multiple windows in tkinter
13:26
Atlas
Рет қаралды 30 М.
Which Software Architecture Should You Use: MVC, MVP, or MVVM?
24:27
PyQt5 vs. PyQt6: Syntax Changes, Licenses, and Should you upgrade? [2022]
8:19
PyQt5 Tutorial - Signals and Slots
16:47
Tux Codes
Рет қаралды 14 М.
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 91 МЛН