Hi, I'm a total newbie with Qt. Have been looking the QT assistant help for a while to figure out how to resize the window by pressing just a pushbutton
Below is my code snippet:
...
...
QObject::connect(&quit,
SIGNAL(clicked
()),
&app,
SLOT(resize
(500,
500));
QApplication app(argc,argv);
QPushButton quit("Quit");
...
...
QObject::connect(&quit, SIGNAL(clicked()), &app, SLOT(resize(500,500));
To copy to clipboard, switch view to plain text mode
When I press the pushbutton, the app is still not resized. I'm just trying to get a hang on qt, and that's why I just really want to know how to do this.
I read the assistant which said that if i call for resize, then a resize event will automatically occur, but somehow the app is not resizing at all. Hope anyone can help on this. Thanks in advance!
Bookmarks