C++ Qt 05 - Displaying Windows
Uploader Comments (VoidRealms)
All Comments (36)
-
as I wrote previously, good job.
-
@thowabu I'm a bit hazy on this part too. If QT truly does release the space once it's finished, in the example wouldn't it better to just use a local pointer instead of a member pointer?
-
Hi, there´s something i dont understand.
Why was it necesary to go thru the trouble of declaring a class member of type MyDialog on MainWindow (adding mDialog to mainwindow.h, etc)?
why not just create the dialog on the heap inside the OnNewWindow function? like...
MyDialog dlg = new MyDialog(this);
i think that in this situation mDialog class member is useless, since the pointer will be overwritten every time the user clicks the new window button.
-
I think I got it.
He allocate the memory for the Object.
Function "new" give back the pointer and do the C++ CTor and so on.
Every time he does it.
So evertime a New Dialog is created and "running".
But I never reach the older created Objects.
Shouldn´t a good Programmer avoid this Situation??
(Obviously QT will release the Space on exit..)
-
Consider what the C++ 'new' command does - creates a new heap variable and gives you a pointer to it. Each time you create a new dialogue window object you overwrite the previous pointer reference in the 'mdialog' pointer (private class variable).
-
Qt creator was build in Qt? That's a paradox. Aaaaaaaaaaaaaaaaaaaaaaaaaaah
-
8:45 gives error
ISO C++ forbids declaration of 'myDialog' with no type
-
how can I do to create and give functions to buttons if I can't use the form??
-
You've earned my subscription.
-
What the fuck happened to nice and educational youtube channels? Oh, VoidRealms is there, forget what I just wrote! :D Great!
Great vid dude, but I'm having trouble with the code inside the new window void, when I type .setModal(true) and .exec() and then I run the program, it gives me errors saying that the class "x" has no member named setModal and exec.
Please help!
Reloadedrhapsody 9 months ago
@Reloadedrhapsody I think your window is a mainwindow, try using a QDialog instead
VoidRealms 9 months ago
@VoidRealms dude, I'm totally new to this program, is there any way I can chat with you (if you have time) so you can help me?? Please? My proyect is due friday
please? yes? :D hahaha
Reloadedrhapsody 9 months ago
@Reloadedrhapsody hehe sorry i have been uber busy with work and kid, you can always email me!
VoidRealms 9 months ago
I'm adding you to my recommended channels immediately.
TheBlitMaster 9 months ago 2
@TheBlitMaster :D
VoidRealms 9 months ago