Master PyQt5 part 11: Application Infrastructure and Communication

  Рет қаралды 4,571

Alan D Moore Codes

Alan D Moore Codes

3 жыл бұрын

In this video, we'll talk about some basics of application infrastructure and inter-object communication for PyQt5 Applications.
Follow Alan at www.alandmoore.com
Purchase a copy of Mastering GUI Programming with Python here: amzn.to/3Dr8cAy
Example code for this video can be found here: github.com/alandmoore/PyQt-Vi...

Пікірлер: 43
@sab6261
@sab6261 Жыл бұрын
Thanks for these videos. I watched them all. They really eased my learning of PyQt which is 90% of my work these days.
@rkntan
@rkntan 3 жыл бұрын
Well, the sibling analogy is helped me figure out something I have been struggling to solve. That's it. Thank you very much!
@dnmnsmith
@dnmnsmith 2 жыл бұрын
Just bought your book on the strength of the videos. Thank you!
@dougstrong3272
@dougstrong3272 3 жыл бұрын
Alan , you are the only one on the internet who has tried to explain "program design". This was a great effort. I tried to write a real program. The program got so complex it just stopped working, I lost control of it. I still do not know how to design a large program. There is almost nothing on the internet about program design. I wish you would do more with program design. I tried to write a "flashcard" program. Thank You
@alandmoorecodes3585
@alandmoorecodes3585 3 жыл бұрын
Thanks Doug; program design can be a tough subject to get a handle on. Often it's very application specific, so it's hard to make instructional videos about it. I'll see if I can pull together some more coherent thoughts on the topic, though.
@AlphaWatt
@AlphaWatt 2 жыл бұрын
Dude thank you for this. Lately Ive been trying to write using factories etc. but end up still tightly coupled in some ways. These examples and analogies really helped. Thanks again!
@alandmoorecodes3585
@alandmoorecodes3585 2 жыл бұрын
Thanks!
@andredempsey2687
@andredempsey2687 3 жыл бұрын
Great analogies. I’ve always avoided signals and slots because they seemed complicated and I never took the time to understand them. This video inspired me to start using them. Thanks!!
@ali-kadar
@ali-kadar 3 жыл бұрын
Signals and slots and all the other object-oriented stuff may look overkill for toy applications but they are essential for building large scalable applications with loosely coupled components. That's a very important piece of advice. Thanks again. I think I am going to go grab that book of yours to learn in more depth.
@za012345678998765432
@za012345678998765432 3 жыл бұрын
Love all the analogies! great guide :)
@mimmotronics
@mimmotronics 3 жыл бұрын
Thank you so much for making these. For me, this was easily the most important video in the playlist, as it addressed problems I was having when using Tkinter before embarking on learning Qt.
@Factory400
@Factory400 3 жыл бұрын
After going through your book and other videos - this is exactly where I got stumped. So glad you were able to make this video.
@danhull5507
@danhull5507 3 жыл бұрын
Still learning and was heading down the wrong path on an app I am working on. Reconfigured my GUI as suggeted and it now makes it way more clearer. Thx
@Dimlutube
@Dimlutube 2 жыл бұрын
Another great video. Glad I watched the whole series. You made some complicated things very easy to understand.
@Vogelmama83
@Vogelmama83 3 жыл бұрын
Hey Alan, Thank you very much for your lessons! I've seen it twice It was a pleasure listing your voice, experience & deep knowledge ❤️
@manonthedollar
@manonthedollar 3 жыл бұрын
18:00 Man, this is such good advice. This whole video came along exactly when I needed it. Thank you!!
@alandmoorecodes3585
@alandmoorecodes3585 3 жыл бұрын
Thank you!
@andrefbillette2774
@andrefbillette2774 3 жыл бұрын
Great series Don't stop
@vicktorus847
@vicktorus847 3 жыл бұрын
That's analogy about your children is very special ! This never happen here ! ;) :) :) ;)
@alandmoorecodes3585
@alandmoorecodes3585 3 жыл бұрын
Thanks :)
@abhaysalvi9787
@abhaysalvi9787 3 жыл бұрын
Heyyy! Good to see you back 🙈
@normreed9886
@normreed9886 3 жыл бұрын
Thanks, I got your book and it is good but this video tied it up for me
@duanemcdonald6960
@duanemcdonald6960 3 жыл бұрын
your content and delivery is perfect for my learnign style. Please continue! My goal is to become a python programmer (my previous career path was been derailed due to 2020)
@alandmoorecodes3585
@alandmoorecodes3585 3 жыл бұрын
Thanks! Working on some ideas for my next few videos.
@boblittle2529
@boblittle2529 3 жыл бұрын
Wait, what? "Too complex"? Yyyeah, I'm gonna go ahead and disagree with those people, mkay? In my view, too many books, tutorials, videos, etc. make things too *simple*. They'll demonstrate threading (for example) by connecting a button to a function and all the function does is a Thread.sleep(5000) type of thing. This series has so far given me the right amount of depth I need from an instructor and doesn't "talk down" to me.
@rebelScience
@rebelScience 3 жыл бұрын
Hey Alan, thank you for your work. I am wondering if there is a "Second Edition" of your book planed? Or if there is a place where one could get the latest version of it (if it is at all applicable).
@alandmoorecodes3585
@alandmoorecodes3585 3 жыл бұрын
Nothing planned yet, I'm basically waiting on PyQt6 to mature a bit. There's only one edition so far.
@richiericher9084
@richiericher9084 3 жыл бұрын
So basically, we we are mimicking LabView-style programming but with actual code Great explanation though
@vaisakhkm783
@vaisakhkm783 11 ай бұрын
Thank you for this wonderful tutorial... 😅 but feels like you were a java programmer before this...
@greggrivas
@greggrivas 2 жыл бұрын
What an informative video, thank you for your hard work sir. I have a question though. What happens when one has multiple ui files (from qt designer for example) and wants to bind all that together? (let's say for example I have one ui file for the main window you are using here and then a different ui file for the settings window you are using here)
@Shannxy
@Shannxy 3 жыл бұрын
Hi man great series! I have a question regarding how to keep your code loosely coupled when signaling through multiple layers. My (motherboard) has a (component) with 3 distinct sections (subcomponents?) that I made into separate classes and called from the (component) If I want to connect a signal from the (motherboard) *to* a (subcomponent) of my (component): 1) Is it okay to directly connect the signal to a slot in the (subcomponent), or should I connect it to a slot in the (component) which then further instructs it's subcomponent? 2) For the other way around, for a signal from a (subcomponent), do I need to "catch and emit" the signal from the (component) before finally "catching" the signal in the (motherboard)? Any answers are greatly appreciated, as my beginner brain is hurting from trying to figure out how to properly "lose couple" my hierarchical code.
@Shannxy
@Shannxy 3 жыл бұрын
My reason for asking is that after making my distinct sections in a (component) into (subcomponents), it felt wrong to do either of these: 1) self.component.subcomponent.signal.connect(x) 2) self.component1.signal.connect(component2.subcomponent.slot) I can't try to justify (2) as you're directly instructing a subcomponent, but I'm not sure whether just receiving a signal from subcomponent might be okay or not. I'm a beginner and just trying to take your teachings into account, which is why the alert went off, but I just don't know if its warranted or not.
@alandmoorecodes3585
@alandmoorecodes3585 3 жыл бұрын
Like anything, decoupling can become excessive and over-complicate an application; still, I find value more and more in building a clear "employees only" boundary for components, beyond which the outside code may not enter. It means that when I work on that component, I can truly just work on that component and not have to be concerned with how that's going to impact code outside, so long as the interface remains stable. But that means building the infrastructure in your components to broker any interaction with its contents (so, signals that just pass on signals, or slots that just pass on slots). Is it worth doing? If your app is never destined to be more than half a dozen classes, maybe not. If it could become tens or hundreds of classes, well, it will likely save you a headache down the road when something needs changing or refactoring.
@videodocta9709
@videodocta9709 3 жыл бұрын
Great work on these tutorials!! Thank you for your time. Does your book include QwebengingView/Page? Hope to see more tutorials from you, you're a natural!
@alandmoorecodes3585
@alandmoorecodes3585 3 жыл бұрын
Thank you! There is a whole chapter dedicated to QWebEngine in the book. Hope to get more tutorials soon, just tied up with other projects this spring.
@sino-atrial_node
@sino-atrial_node 3 жыл бұрын
Hey alan, Just to let you know before i watch the full video, i think your "complex" way of coding should be the standard way of coding. Because my first languages were Java and C. I really prefer the strictness of java. (i am not from CS background nor a professional coder, just a normal guy who loves to do casual programming)
@manonthedollar
@manonthedollar 3 жыл бұрын
19:00 Is it important for signals to be declared as class variables rather than created with each instance?
@alandmoorecodes3585
@alandmoorecodes3585 3 жыл бұрын
Yes, check out this answer here: forum.learnpyqt.com/t/why-are-signals-defined-as-class-variables/153
@imadetheuniverse4fun
@imadetheuniverse4fun 2 жыл бұрын
Hey Alan, I have a question about your PyQt5 book (Mastering GUI Programming with Python) and I don't know how else to reach you. On page 186 you write about building a new category pop-up form for the calendar widget. Everything makes sense but I don't see any code to connect a signal that activates when the event_category combobox item is clicked. I ask this because I've been reading the Qt docs on how to do this, but it seems the closest available signal (textActivated) is not available in PyQt 5.9.2 Did I miss something? Thanks!
@imadetheuniverse4fun
@imadetheuniverse4fun 2 жыл бұрын
lol... of course I think I figured it out right after posting. I found a signal called currentTextChanged which seems to do the trick!
@alandmoorecodes3585
@alandmoorecodes3585 2 жыл бұрын
Glad to hear it! If you think you've found an error in the book, please get in touch with Packt customer care, so they can publish an errata. Thanks!
@user-vx2ww4gy3s
@user-vx2ww4gy3s 3 жыл бұрын
Unrelated to PyQt5 but what OS are you on?
@alandmoorecodes3585
@alandmoorecodes3585 3 жыл бұрын
Arch linux
Tkinter Basics 5: Dialog and Message Boxes
25:33
Alan D Moore Codes
Рет қаралды 1,9 М.
QtDesigner and PyQt5:  The right and wrong way to use them together
37:16
Alan D Moore Codes
Рет қаралды 107 М.
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 137 МЛН
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 24 МЛН
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 54 МЛН
Tkinter vs. PyQt:  Which Python GUI framework is right for you?
38:11
Alan D Moore Codes
Рет қаралды 64 М.
Master PyQt5 part 10: Make responsive GUIs with Threads
33:35
Alan D Moore Codes
Рет қаралды 19 М.
Tkinter Basics 10: Binding Events
23:35
Alan D Moore Codes
Рет қаралды 3,3 М.
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 725 М.
Python Classes pt1:  5 Myths about Python Classes
18:39
Alan D Moore Codes
Рет қаралды 3 М.
Implementing a background process in PyQt5 using QThread
15:08
Mike Miller
Рет қаралды 37 М.
Tkinter Basics 3: Control Variables
20:47
Alan D Moore Codes
Рет қаралды 3,7 М.
3D in TypeScript using Ray Casting
3:14:03
Tsoding Daily
Рет қаралды 32 М.
НЕ ПОКУПАЙ СМАРТФОН, ПОКА НЕ УЗНАЕШЬ ЭТО! Не ошибись с выбором…
15:23
КРУТОЙ ТЕЛЕФОН
0:16
KINO KAIF
Рет қаралды 4,9 МЛН