PDA

View Full Version : Hide/Show problem



premroxx
9th September 2011, 15:13
Hello,
I am writing a gui using QT. I just consists of some fillable text boxes & labels etc. Every time you hit 'next' it hides the exiting elements passes control to a different function& displays new elements in the same form(using show/hide). After filling out the form, u click submit & it goes back to the begin screen, so that u can keep filling it again & again. Now the problem i keep running into, is that textboxes & labels keep showing out of place. So to solve this, I have a hide function which gets invoked everytime you go to the main screen. This function hides all the elements in the form as a precaution before starting every cycle. But i seem to have the same problem. labels keep popping up in unexpected places. Why does this keep happening. I checked my code & it doesnt have a .show method on those labels. Do i have to use the .hide() on every label i dont want to be shown at every point in the program? Sorry if this is a bit vague. I dint know which part of the program i should post here to be helpful to you.

Thanks in Advance.

boudie
9th September 2011, 15:33
Looks like you are trying to create something that's already provided by Qt: a QWizard.
A QWizard allows you to browse through several pages of class QWizardPage.

Use layouts and you won't have any trouble with 'moving' widgets anymore.