"So there's a few ways we can do that". Love that approach! This series is such a gem.
3 жыл бұрын
Thank you so much!!! I am very grateful not only for your videos but your books have helped me a lot in this long path of programming in Python and PyQt.
@alandmoorecodes35853 жыл бұрын
Thanks!
@tungbrian41082 жыл бұрын
What if passing value from sub module to main module
@hanzofuma5 жыл бұрын
omg, thx so much you are a saver I struggled on how to move the data with QtCore.Signal or with Getters or with the constructor 2 hours and i m changing the code until i found your video
@alandmoorecodes35855 жыл бұрын
Awesome, glad it helped!
@chrisw55093 жыл бұрын
Fantastic video!! I used what you presented to create a button that pops up the Calendar Widget. My next steps which are to set the input field (widget) to sync with the calendar. Based on what you have provided in the video I should be able to accomplish that. I'm working my way through your videos. If you publish a book on PyQt6. I plan to buy it. I know you have a book on PyQt5 but want to wait for PyQt6 version.
@alandmoorecodes35853 жыл бұрын
Thanks! I looked at doing a PyQt6 version of the book earlier this year, but PyQt6 was still incomplete and the timing was just wrong. Been busy with another book project in the meantime, so it won't be forthcoming anytime too soon.
@kevinclary51674 жыл бұрын
This was the exact tutorial I needed - thank you!
@alandmoorecodes35854 жыл бұрын
Awesome!
@Linuxovert4 жыл бұрын
thanks Alan I will try to reuse this code in finishing my "Request Form for events" that i'm working on for the last couple of months.
@himanshupoddar13953 жыл бұрын
9:33 Why using submitted signal? why not use submit button on click
@rimshayawar22903 жыл бұрын
If there are three classes A, B, and C, and if I want to pass data from A to C using the PushButton of B window to open the C window. How I can accomplish this task?
@michaelbowen88644 жыл бұрын
This was immensely helpful, thank you so much
@OficinadoArdito2 жыл бұрын
man... not all heroes wear capes... thanks a LOT!
@alu96454 жыл бұрын
I would love to see your emacs tutorial and setting for python. That would be really great!
@alandmoorecodes35854 жыл бұрын
Thanks! My emacs config is a bit of a mess at the moment, but maybe I can clean it up a bit and share.
@catseye25003 жыл бұрын
Mr. Moore, I am new to python programming and PYQt5. I watched your video and it was very good. I am having an issue though, where when I get user name from one class, when it is suppose to pass the name to the other class it displays nt instead of the name. I am at a loss on how to fix the issue.
@wandersonfelipe55883 жыл бұрын
Hey Alan, thanks so much for the content. I got to do what you did, and it works, but with a little error: I've got to send the information from the dialog window to the previous one, but when closing the dialog, I receive the message "TypeError: native Qt signal is not callable", then the program ends. What could I do to fix that?
@alandmoorecodes35853 жыл бұрын
Sounds like you've got some parentheses in the wrong place. Would need to see your code to be sure.
@wandersonfelipe55883 жыл бұрын
@@alandmoorecodes3585 how can I send you the entire code?
@wandersonfelipe55883 жыл бұрын
@@alandmoorecodes3585 I SOLVED IT. On the dialog box (the secundary window), I was using a QtWidgets.QDialog (which was making the program end when closed), then I replaced it by a QtWidgets.QWidget, and now it is working very well.
@adamkrysztopa67784 жыл бұрын
I like the way you explained that. I have a question: I was always creating 'sub window' as a child class of Main. After that I was referring to the Main window as e.g. in that case: self.parent().set_messages(...). I wondering if it is anyway non-optimal or non-elegant.
@alandmoorecodes35854 жыл бұрын
I think you can get away with stuff like this to a degree if you're consistent, but it does leave your classes tightly coupled. Your class has to assume that "parent" will always be an object with set_message(), for example. If for some reason that arrangement needs to change (for example, a form needs to become a child of a different widget, or become its own window), you're stuck. One aspect of elegant code is code that it solves the same problem in a consistent way. If you're communicating between child windows and the main window using direct calls, you can't use the same method to communicate between two windows or two sibling widgets. By sticking with signals and slots, you can communicate consistently between any objects in your app. To me that seems more elegant than mixing methods.
@mohamedyahya40145 жыл бұрын
greate tutorial big thanks....... I got a question which is I have tow classes, emitting a signal from A to B when trying to print the signal object it gives me " " could you help me with why is that happening and how to read the object as a valid python data type so I can use it the required point, please?
@alandmoorecodes35855 жыл бұрын
That's what I would expect a signal object to show if I printed it. Not sure what you were expecting.
@someoneontheinternetuvenev62683 жыл бұрын
It would be great if you made a tutorial about QStackedWidget, sadly there really isn't any good tutorials for this and the ones that exist only show how to create multiple screens but don't show how to properly pass data between screens. (their method is basically just adding more and more widgets to the stack and none of them mention how to prevent the crazy memory leak that happens when you do that)
@alandmoorecodes35853 жыл бұрын
I'll see what I can do.
@DanArizona3 жыл бұрын
Hi Alan, great stuff. You put your signal/slot methods code into your dialog class. If Dialog was created using designer, would you recommend another file to contain the signal/slot methods? So two files for the two window GUIs (Main and Dialog), and two files to manage those GUIs.
@alandmoorecodes35853 жыл бұрын
Yes, remember that what comes out of designer is *not* your actual dialog widget, but an object which will build the GUI you designed on a widget class that you provide. See my video on "QtDesigner and PyQt5" for more detail on that. You'll need to create your own QWidget or QMainWindow subclass on which this builder class will build the UI, and in which you can define callbacks, signals, etc.
@barretoingridy3 жыл бұрын
You're awesome!!!! Thank you =D
@GerardoBelot4 жыл бұрын
8:55 pass a signal from other win to main, just to remind me!!
@cinquecento19852 жыл бұрын
thank you. little confusing, but I got it working.
@Factory4004 жыл бұрын
Ordering the book now......I need to be swept off my feet :-)
@quleman4 жыл бұрын
Thank you
@richiericher90843 жыл бұрын
apperently PyQt5 doesn't have a lot of users. Otherwise your tutorials would have much more views since they are just excellent.
@alandmoorecodes35853 жыл бұрын
Thanks! This channel's growing fast, though, I can't really believe it.