Very Well explained :). Please can you make video how to use QThread?
@wearesciber Жыл бұрын
Sure 😊
@Nathan-gd6br Жыл бұрын
in mainwindows.cpp file, you create a pointer to Dialog every time button clicked. but you didn't delete it. you will end up with memory problem
@wearesciber Жыл бұрын
Well actually, since i passed "this" to the constructor when creating the object, it sets up a parent child relationship between the mainwindow and the dialog. Then when the parent gets deleted the child will be deleted as well. I didn't mention this clearly in the video, sorry about that.
@Nathan-gd6br Жыл бұрын
@@wearesciber No. Parents will delete their children . But in your case Your parent is main windows. In another word, As long as you don't close your application. Your dialogue will remain in memory. Let's say you click the button 10 times You will have 10 dialogue, remain your memory unless you close the whole application
@wearesciber Жыл бұрын
Mmm. Yeah you are right. Thanks for pointing it out.