Results 1 to 2 of 2

Thread: Hide/Show problem

  1. #1
    Join Date
    Aug 2011
    Posts
    42
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Hide/Show problem

    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.

  2. #2
    Join Date
    Jan 2009
    Location
    The Netherlands and Spain
    Posts
    150
    Thanks
    6
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Hide/Show problem

    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.

  3. The following user says thank you to boudie for this useful post:

    premroxx (13th September 2011)

Similar Threads

  1. how to show an app if it manually hide
    By jthacker in forum Qt Programming
    Replies: 1
    Last Post: 26th March 2010, 13:02
  2. how to show and hide frames?
    By rambo83 in forum Qt Programming
    Replies: 2
    Last Post: 6th January 2010, 09:53
  3. Hide and Show problem in master layout
    By QPlace in forum Qt Programming
    Replies: 2
    Last Post: 3rd July 2009, 16:04
  4. Hide and Show QMenu
    By febil in forum Qt Programming
    Replies: 3
    Last Post: 25th March 2009, 09:31
  5. hide/show screen update problem
    By SkripT in forum Qt Programming
    Replies: 2
    Last Post: 6th February 2006, 17:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.