PyQt5 Tutorial #8 - Signals & Slots
25:15
Пікірлер
@5yotub
@5yotub 8 күн бұрын
Thanks! I've been looking for how to use the addButton method for hours!
@darlingtonnkwaze
@darlingtonnkwaze 7 күн бұрын
Glad you found it helpful!🙏
@techwithsibro
@techwithsibro 15 күн бұрын
Thank you brother
@darlingtonnkwaze
@darlingtonnkwaze 15 күн бұрын
I'm glad you find it helpful.
@Hassanhassan-xn4gl
@Hassanhassan-xn4gl 27 күн бұрын
Great video for vrv/vrf people.thanks
@darlingtonnkwaze
@darlingtonnkwaze 26 күн бұрын
Glad you find it helpful.👍
@JohnPaulOrtega-ww5zn
@JohnPaulOrtega-ww5zn Ай бұрын
Good day sir. Thank you for this tutorial. Just a quick question, I noticed in the software that there are pipe lengths indicated. Does increasing the pipe lengths of branch-to-indoor unit change the size of the pipes of branch-to-branch connection. If so, how can we consider that in manual calculation?
@darlingtonnkwaze
@darlingtonnkwaze Ай бұрын
Hello. Thank you too for your question. The pipe sizes are primarily influenced by the system's capacity at each point. Although, an increase in the equivalent length of the pipes between outdoor and indoor units could force a change in the main liquid pipe. In such a case, some manufacturers would recommend using the next liquid pipe size. Different manufacturers have set limits for pipe lengths. At the point of making this video, for Multi V 5, 1. the actual maximum pipe length between the outdoor unit and the last indoor unit is 200m, 2. the equivalent maximum pipe length between the outdoor unit and the last indoor unit is 225m, 3. the longest pipe length after the 1st branch is 40m (90m for conditional applications), 4. the height between the outdoor unit and indoor units should not exceed 110m. 5. the height between indoor units should not exceed 40m. 6. the maximum total pipe length is 1000m. The software itself would shout at you if you exceed these limits. You should also consider these limits in manual calculations/drafts. I hope this helps.
@platinumhvacrtechnologies457
@platinumhvacrtechnologies457 2 ай бұрын
my guy,you are doing a great job thanks.❤🙌👏👍
@darlingtonnkwaze
@darlingtonnkwaze 2 ай бұрын
Thank you too for your kind words.🙌
@SGTIvan921
@SGTIvan921 2 ай бұрын
7:15 Where coding begins
@darlingtonnkwaze
@darlingtonnkwaze 2 ай бұрын
So, the way the code works is: First, I wrote a script to scrape the real-time data from Yahoo Finance (using Selenium) and store it in a json file. Second, I wrote a code to get the data from the json file and plot it in a canvas on my desktop app. I didn't use Qt Designer to create the UI of the app. Instead, I wrote it from scratch. I created a window and (among other things) I imported FigureCanvasQtAgg and NavigationToolbar2QT. FigureCanvasQtAgg helps us to create a canvas for the plot, while NavigationToolbar2QT helps us to add a navigation tool bar to the plot. Then, I continued to create the UI by adding widgets including a Figure (the region for the plot). I put the figure in the canvas that I created initially. Afterwards, I defined a function to grab the real-time data from the json file and plot it. I also created another function called "ani_func", which uses FuncAnimation to update the plot. I hope this helps.
@SGTIvan921
@SGTIvan921 2 ай бұрын
Bro, this tutorial has been quite good. I've been having trouble trying to make a real-time plot, though. Maybe you could make a video of a real-time pyqt5 plot? I would appreciate it.
@darlingtonnkwaze
@darlingtonnkwaze 2 ай бұрын
Hello, I actually did one. Find the link here kzbin.info/www/bejne/aWG9lnhnoteEf6s Please check it out and let me know if you still need help.
@SGTIvan921
@SGTIvan921 2 ай бұрын
15:00 Create a horizontal layout 17:51 Adding the canvas 19:17 My way: I'll connect a function to a button clicked signal 20:46 Adding a function plotOnCanvas() 23:22 note to self: link this plot to my real-time data
@Newty316
@Newty316 4 ай бұрын
Kindly share the online link where I can get the lg total hvac solution provider book.
@darlingtonnkwaze
@darlingtonnkwaze 4 ай бұрын
Hello, you can find a later version here. www.lg.com/br/business/download/airsolution/202109_PDB_MultiV5_Standard_380V[20220201_221819284].pdf
@Newty316
@Newty316 4 ай бұрын
Thanks so much Brother.
@fungaidanielmasvaya3205
@fungaidanielmasvaya3205 5 ай бұрын
Hello. Can i please have the data book you used
@darlingtonnkwaze
@darlingtonnkwaze 5 ай бұрын
Hello, please send me an email.
@CodeSpectrum
@CodeSpectrum 6 ай бұрын
Very beautiful tutorial.
@darlingtonnkwaze
@darlingtonnkwaze 6 ай бұрын
Thank you! Glad you find it useful!
@phamhuutri1996
@phamhuutri1996 6 ай бұрын
How come you don't need to use setLayout() method to add your grid layout to your widget? Can you please explain me this, I would appreciate it a lot. Thanks in advance
@darlingtonnkwaze
@darlingtonnkwaze 6 ай бұрын
Hi, thank you for your question. In this video, I already made the grid layout a child of the main widget. So, I just had to add the other children of the main widget and position them. Another approach would probably be to create the layout without a parent, then add child widgets to it before setting it as the layout of the main widget. I believe the second approach is what you were expecting. However, I think you won't lose or gain much if you use any of the two approaches. Although, the second approach could be useful when you want different widgets to have the same layout. I hope this helps.
@johnphilip7084
@johnphilip7084 6 ай бұрын
can u share me the software plz
@darlingtonnkwaze
@darlingtonnkwaze 6 ай бұрын
Hi. Check the link below and search for LATS HVAC. lghvac.com/mylg-hvac/ If it doesn't work or you need further guidance, kindly contact the original equipment manufacturer (OEM) or any of their partners within your region.
@biglomo5624
@biglomo5624 8 ай бұрын
Great video with useful knowledge
@darlingtonnkwaze
@darlingtonnkwaze 8 ай бұрын
Thanks, bro.
@user-lo7cr4ry4v
@user-lo7cr4ry4v 8 ай бұрын
can't wait
@bernhardkatter
@bernhardkatter 9 ай бұрын
Very nice Video
@keeponwishing3856
@keeponwishing3856 9 ай бұрын
God BLESS YOU Brother! You helped me A LOT ! God bless You!
@darlingtonnkwaze
@darlingtonnkwaze 9 ай бұрын
Amen! And you too! 🙏
@Saiful-islam1996
@Saiful-islam1996 9 ай бұрын
Need software link brother
@darlingtonnkwaze
@darlingtonnkwaze 9 ай бұрын
Hi, you may have to contact the original equipment manufacturer (OEM) or any of their partners within your region to get the software.
@Saiful-islam1996
@Saiful-islam1996 9 ай бұрын
Thank you for your response
@shaha-stam
@shaha-stam 10 ай бұрын
Thank you so much for the video! I've been looking for something like this for a long time - it's simple and easily explained.
@darlingtonnkwaze
@darlingtonnkwaze 10 ай бұрын
I'm glad you found what you were looking for in this video! Wishing you the very best!
@Falinaschi
@Falinaschi 11 ай бұрын
BEST VIDEO EVER👍👍👍👍👍
@darlingtonnkwaze
@darlingtonnkwaze 11 ай бұрын
I'm glad you found it helpful! 🙏
@juanarceo
@juanarceo Жыл бұрын
Thank you, it has been very helpful!
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Glad it was helpful!
@user-ot6jz1jb6q
@user-ot6jz1jb6q Жыл бұрын
Hi, thanks for your sharing. May I have a question about how can refresh the canvas? Now I am pulling data to draw the canvas. The first tim works. But when I keep pulling the new data, the canvas doesn’t change.
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Hi. You can clear the canvas with "self.canvas.clear()" just like in the video so that it clears the canvas before plotting a new graph with a button click. If you're working with real-time data, I have a separate video on that. kzbin.info/www/bejne/mWmml3qHq9Boi6s
@andresfelipevelascocoronad2308
@andresfelipevelascocoronad2308 Жыл бұрын
Man, I've been loking for something that works to me for 2 days an you were the solution, Thanks to U
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Wow! I'm glad this worked for you. Thank you too for your comment!
@aldikanugraha9278
@aldikanugraha9278 Жыл бұрын
Hey can you share the source code, thanks
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Hello. Let's see how it works.
@yamanfattouh
@yamanfattouh Жыл бұрын
Thanks for video.
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
I'm glad you found it helpful.
@guillermovillagarcia5629
@guillermovillagarcia5629 Жыл бұрын
Thanks for the guide! But I did the same steps and with the same import order in pyqt5 and I get the error: TypeError: addWidget(self, a0: QWidget, stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'FigureCanvasAgg' How can I fix this? :(
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Hello. I suspect you have other versions of PyQt or PySide installed on your machine. Try changing the import order. I mean import matplotlib and other matplotlib associates after PyQt5 import statements. Or create a new virtual environment with PyQt5 installed.
@guillermovillagarcia5629
@guillermovillagarcia5629 Жыл бұрын
@@darlingtonnkwaze I'm stupid and imported the wrong matplotlib module, your video is amazing bro 🤝
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
@@guillermovillagarcia5629 Lol. You're not. Glad you found the video helpful.🤝
@Gero141
@Gero141 Жыл бұрын
excellent. Thanks
@kimhongjung7264
@kimhongjung7264 Жыл бұрын
Thank you for the very good program. loadUi("qt.ui",self) ui file is read and fplt.candlestick_ochl on the widget when the button is clicked can you print the chart?
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Hi, thank you for your comment! An easy way to save the chart would be to add a navigation tool bar to the canvas. (I have a video, where I did that.) Then, you could save the chart with the save button on the navigation tool bar.
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
If you want to print the chart you could use QPrinter.
@blcouz
@blcouz Жыл бұрын
not work w pyside6
@mir6326
@mir6326 Жыл бұрын
Thanks for this video ! Would you advise PyQtgraph or Matplotlib for fast drawing ? Thanks in advance.
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Hi. Thank you too for the feedback! At this time, I honestly haven't tried PyQtGraph yet. So, I may not be able to give an objective comparison between the two.
@dijioui
@dijioui Жыл бұрын
I have a doubt , on my tree diagram , how do I contact you ?
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Hello, you can send me an email.
@PankajKumar-tr2ib
@PankajKumar-tr2ib Жыл бұрын
How can we plot two graph in different layout
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Hello, try using different frames and giving them different layouts.
@gihanketawala9838
@gihanketawala9838 Жыл бұрын
Thank you 🙏🙏
@kosisochukwuezewudo4688
@kosisochukwuezewudo4688 Жыл бұрын
Hi! Thanks a lot for your video. This has been really helpful. I have an issue with making the figure fit into my canvas and in extension frame. Would you have any idea on how to go about this?
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Hi! Thank you for your comment. Try plt.tight_layout()
@benmickal_1691
@benmickal_1691 Жыл бұрын
dude you saved my life
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Happy you found it helpful!
@MichaelPettyMusic
@MichaelPettyMusic Жыл бұрын
Awesome tutorial, thanks for this. I'm trying to get this to work with a map, plotting geojson data. normally I'd call it with plt.show() but doing that here would continue to open it in a seperate window.. Any ideas how to get the map to plot in the frame?
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Hi, Michael. Thank you for your comment. You can follow the same procedure here. For example, in this video kzbin.info/www/bejne/bIDdn2ilpb6chqc, I made a simple 2D/3D contour plot using a similar procedure.
@MichaelPettyMusic
@MichaelPettyMusic Жыл бұрын
@@darlingtonnkwaze Great stuff, thank you!
@ironF5
@ironF5 Жыл бұрын
how to add context menu in qtextedit and add custom features to that context menu?
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Hello, try QContextMenuEvent.
@MrFleischFloete
@MrFleischFloete Жыл бұрын
What @Kira Yamato is saying. Thank you my friend.
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Thank you too. 👍💯
@ironF5
@ironF5 Жыл бұрын
1. how to add zoomin zoomout in Qtextedit using QSlider(horizontal) ? 2. how to add margins/paddings in QTextEdit (like page margins in ms word) ? 3. how to view page view in QText Edit? (like the default view of a page in ms word, google docs, libre office etc) ? 4. how to change themes (dark theme and other themes) using a menubar option ?
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Hello, thank you for your comment. 1. Try zoomIn, zoomOut, 2. Try setStylesheet() 3. Try setViewportMargins 4. Try setStylesheet()
@ironF5
@ironF5 Жыл бұрын
@@darlingtonnkwaze zoomin zoomout doesnot work on my QTextEdit class, i have tried with 3 different approaches, and all of them doesnot zoomin zoomout..
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
OK. I should make a video on that in the future. I currently have technical issues, maybe when I resolve them.
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
I have another video on spline charts, which look better with curves. 👇 kzbin.info/www/bejne/eKCoipWhopekj8k
@perrycooley7464
@perrycooley7464 Жыл бұрын
😠 promosm
@ironF5
@ironF5 Жыл бұрын
can u also create a rich text editor video ( make a comprehensive class of TextEditor inhereted from QTextEdit) and create a comprehensive text editor, with print preview support, table support, a button to change language (without changing language of your system, ), importing picture support, ... though i have implemented it 4-5 times, yet i am looking for improvements.
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Great Idea! I'll work towards that!👍
@ironF5
@ironF5 Жыл бұрын
how to implement context menu, tool bar, menu bar ( in great detail )
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
I'll create videos on these soon.
@ironF5
@ironF5 Жыл бұрын
in the QCompleter, what is the purpose of Model and that listmodel and other types. can u also make video on this! though i have the QCompleter working in my pyqt5 application that loads a matching word from list of words in a file, but i want to learn more.
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Let's see how it goes! For now, you can checkout the documentation. doc.qt.io/qtforpython/overviews/model-view-programming.html#model-view-programming
@ironF5
@ironF5 Жыл бұрын
how to make QTextEdit box look like the word document (like ms word or google sheet), QTextEdit or QPlainText box shows notepad like box, i want my application to look like ms word or like that... can u suggest how can i do that... how to make it look more formal. right now its just a text box ( i want the interface to look like ms word )
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
I'll create a video on that.
@ironF5
@ironF5 Жыл бұрын
hello, in the QTextEdit box, how to highlight a single line that ends with a dot. (i have code for highlighting and selecting a single word and a complete line that ends with new line).
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
OK. Try QSyntaxHighligher.
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Which cooling load calculation method do you use in your country? 🤔
@chidinmanwaneto736
@chidinmanwaneto736 Жыл бұрын
i use the CLTD/CLF method
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
It's also suitable for manual calculations.👍
@pawejanowiec5987
@pawejanowiec5987 Жыл бұрын
Hi, thanks for your video🙂 is there a possibility to have buttons like "zoom", "save png" etc. using canvas? I meant the buttons showed when we use plt.show() command.
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
Hi, you can use matplotlib.backends.backend_qt5agg.NavigationToolbar2QT. Check out my most recent video, where I used it. kzbin.info/www/bejne/aWG9lnhnoteEf6s
@pawejanowiec5987
@pawejanowiec5987 Жыл бұрын
@@darlingtonnkwaze thanks, I'll try it 🙂
@darlingtonnkwaze
@darlingtonnkwaze Жыл бұрын
My pleasure. 👍
@libertarianmonk7013
@libertarianmonk7013 Жыл бұрын
Thank you very much!
@manshaq1792
@manshaq1792 2 жыл бұрын
Good job,bro!