Results 1 to 2 of 2

Thread: how data of one dialog sent to other dialog

  1. #1
    Join Date
    Mar 2011
    Location
    delhi
    Posts
    45
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Exclamation how data of one dialog sent to other dialog

    hi all please tell how data entered in linedit of one dialog can be sent to another dialog .



    thanks with regards:
    gulshan

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: how data of one dialog sent to other dialog

    Assuming:
    1. The dialogs don't know about each other
    2. You have an object that manages the two dialogs, like a main window

    Create a signal in your main window to update the necessary dialogs. Connect a slot in your dialog to the signal from the main window. For example, a slot in dialog 2 is connected to the update signal of the main window.

    Connect a signal of the lineedit or a button from dialog 1 to a slot in the main window.

    In the slot of the main window, fire the update signal.

    Either pass the data via the signal, or have it stored in some accessible place for the dialogs.

    Should be basic Object Oriented Programming.
    There are several other solutions.

Similar Threads

  1. Passing data to dialog via dialog or a method
    By mtnbiker66 in forum Qt Programming
    Replies: 2
    Last Post: 3rd February 2012, 01:39
  2. How to access objects of parent Dialog from Child Dialog .
    By ranjit.kadam in forum Qt Programming
    Replies: 4
    Last Post: 18th April 2011, 06:39
  3. closing child dialog closes parent dialog
    By sparticus_37 in forum Newbie
    Replies: 2
    Last Post: 28th May 2010, 19:46
  4. getting data from a Dialog
    By graciano in forum Newbie
    Replies: 6
    Last Post: 21st August 2009, 20:37
  5. How to blur parent dialog when child dialog is displayed
    By abhilashajha in forum Qt Programming
    Replies: 4
    Last Post: 10th June 2009, 13:01

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.