Qt-interest Archive, March 2002
W/is the best way to transfer data from dialog to creator dialog
Message 1 in thread
How do i pass information between the
dialog where i input text and the one
whick contain the window->show();
there must be a way but i cant find
it
thank for your time ;)
--
[ signature omitted ]
Message 2 in thread
You need a slot in your dialog for the textChanged() signal from your edit
control, and a member variable to store the text.
Then you could write a getText() function in your dialog, or your dialog
could emit a signal passing a reference to the text.
--
[ signature omitted ]
Message 3 in thread
humm lets say i have a window with a full table
i have a search button that pups up a window
to let me enter the number of the row he is looking
for ... to show the window i do
window.show();
do i put the window.getChoice(); after or somewere
and is it possible to connect a signal/slot betwen
2 windows in designer, or do i have to do it by hand
thanks again ;)
dee dee
----- Original Message -----
From: "Paul Robertson" <paul@jprassoc.demon.co.uk>
Date: Fri, 22 Mar 2002 14:43:48 -0000
To: <qtml@linuxmail.org>, <qt-interest@trolltech.com>
Subject: Re: W/is the best way to transfer data from dialog to creator dialog
> You need a slot in your dialog for the textChanged() signal from your edit
> control, and a member variable to store the text.
> Then you could write a getText() function in your dialog, or your dialog
> could emit a signal passing a reference to the text.
> --
> Paul
>
> ----- Original Message -----
> From: "dee dee" <qtml@linuxmail.org>
> To: <qt-interest@trolltech.com>
> Sent: Friday, March 22, 2002 2:23 PM
> Subject: W/is the best way to transfer data from dialog to creator dialog
>
>
> > How do i pass information between the
> > dialog where i input text and the one
> > whick contain the window->show();
> > there must be a way but i cant find
> > it
> >
> > thank for your time ;)
> > --
> >
> > Get your free email from www.linuxmail.org
> >
> >
> > Powered by Outblaze
> >
> > --
> > List archive and information: http://qt-interest.trolltech.com
>
>
--
[ signature omitted ]
Message 4 in thread
Your pop-up should probably be a modal dialog.
Create a class RowDialog which inherits QDialog.
Give it private member variables for the edit control and for the text.
Write a slot function which connects to the textChanged() signal.
Write a getChoice() function to return the text.
In your main window do this:
RowDialog *dlg = new RowDialog(this, "rowdialog", true);
if ( dlg->exec() == QDialog::Accepted )
{
qDebug("The user chose %s", dlg->getChoice());
}
delete dlg;
--
[ signature omitted ]