0

I'm building an application using Qt (on linux). My application basically consists of 2 Windows To keep things simple lets just call them "A" and "B".

A is the application's "main window", some kind of "idle" window which is displayed (maximized) when the app has "nothing to do". It contains a lot of pushbuttons.

If the user presses one of those PBs, Window B should be displayed (maximized too). On B, the user does some work, leaves ("closes") B and Window A is redisplayed.

Now, since Win B needs a lot of data, even some of it requested from a server over the network, I wonder if it was a good idea to "create" Win-B only once (at the end of Win-A's ctor ), and later when needed just show(), and when work is done just hide() it. ???

Maybe someone of you Qt gurus out there can give me some advice?

Thanks a lot! Norbert

norzaw
  • 1
  • 1

1 Answers1

1

If you want to keep the data of window B, showing and hiding is the way to go. If you want to show a clean dialog everytime a user request window B, you should create and destroy it every time.

Paraboloid87
  • 428
  • 2
  • 14
  • Yes. I want to keep (most of) Win-B's data for the "next call". Thanks a lot for your confirmation! – norzaw Mar 07 '16 at 22:12