Results 1 to 3 of 3

Thread: Hiding and showing the same mainwindow multiple times

  1. #1
    Join Date
    Mar 2012
    Location
    India
    Posts
    102
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Hiding and showing the same mainwindow multiple times

    Hi,

    I am have made a design in which I have a server and a client application. The client application uses dynamic loading of forms as per names given by server. Now in client I have a "mother" mainwindow wherein I load the form and show. It works this way:
    * First server sends a packet to client telling it to load a screen.
    * The client loads this form in the "mother" mainwindow and shows it.
    * The user enters something on to this screen and hits submit button.
    * On this the client does two things - sends this data to the server in a packet and hides the current screen.
    * According to the data received the server decides the next screen and tells client.

    The problem is everything works fine for one form but when I try with multiple forms I get fixed. I connected hide of mainwindow with the click of submit button and i connected show with the signal emitted when client receives a packet from server. But this doesnt work. Don't know why !

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Hiding and showing the same mainwindow multiple times

    and how are we meant to be able to figure out the problem?
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  3. #3
    Join Date
    May 2012
    Location
    Bangalore, India
    Posts
    271
    Thanks
    29
    Thanked 50 Times in 47 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Hiding and showing the same mainwindow multiple times

    void QWidget::hide () [slot]

    Hides the widget. This function is equivalent to setVisible(false).

    void QWidget::show () [slot]

    Shows the widget and its child widgets. This function is equivalent to setVisible(true).

Similar Threads

  1. Replies: 1
    Last Post: 9th August 2011, 21:38
  2. Can I call setRange multiple times for QProgressBar ?
    By elizabeth.h1 in forum Qt Programming
    Replies: 2
    Last Post: 30th April 2010, 07:18
  3. Contex menu appear multiple times
    By kubas in forum Qt Programming
    Replies: 2
    Last Post: 7th September 2009, 14:55
  4. Showing and hiding menubar
    By borges in forum Newbie
    Replies: 1
    Last Post: 23rd September 2007, 10:56
  5. Performance in hiding/showing widgets
    By Paalrammer in forum Newbie
    Replies: 12
    Last Post: 14th February 2007, 18:57

Tags for this Thread

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.