Hello!
I want the size of my main window to change as the program runs.
This is my main function
Code:
int main(int argc, char *argv[]) { MyWidget window; int x = 100; int y =100; window.setGeometry(5,20,screen.width()-x,screen.height()-y); window.show(); return application.exec(); }
This above positions my window where I want it. But as the program runs the x and y variables will change and I'd like to resize window by doing
from other functions. I cannot do this since "window" is not reconized by other functions.Code:
window.setGeometry(5,20,screen.width()-x,screen.height()-y);
I don't think I can put this implementationin my *.h file to make it public since that wouldn't work.Code:
MyWidget window;
Does anyone have suggestions how to make this automatic window resizing work so that it could be done from functions other than "main". Maybe use updateGeometry() somehow?