Deleting Content From Main Window (Newb)
-
Hi All,
Apologies for having to ask what could be perceived as a 'newbish' question.
I'm fairly new to Qt and so will just go ahead and ask;
What is the procedure for 'calling' new content into your main window? I have tried Googling this but it seems somewhat difficult to phrase
Like any standard app, I want the main window to be fixed but the content inside to change on_Button_clicked for example. Currently all I can figure out how to do is generate a new 'window' - whereas in my case I just want to re-use the existing one with new buttons etc
Once again, apologies if it's a somewhat trivial question
Regards
Tzepo -
Hi and welcome to devnet,
What exactly would you like to change in your QMainWindow ? Show a different center widget ? Show a dialog ? Something else ?
-
[quote author="SGaist" date="1424207695"]Hi and welcome to devnet,
What exactly would you like to change in your QMainWindow ? Show a different center widget ? Show a dialog ? Something else ?[/quote]
Hello!
Thanks for reposnding.
Apologies for my lack of eloquence with the phrasing of the question.
What I'm asking is really basic but I fear I've overcomplicated it.
I'm just wondering how I'd go by re-using my MainWindow so that, for example;
I click on a Button on the MainWindow, but it loads a new page (in the same Window) but with different widgets etc
Just wondering how I could call this?
-
Again, it depends but you have several tools like QStackedWidget if you simply want to change from one widget to another or QTabWidget.
You should take a look at Qt's examples and demos, you'll probably find there something to get started