ok You create a C++ class based on QDialog. Using QT designer for example. Say you called it myDialogWithEdits.
This class has in its ui the edits. Because the ui is private you need to create a public function to get the value from the edits. Lets call it getValueOfEditOne().
in the .h
public:
public:
QString getValueOfEditOne();
To copy to clipboard, switch view to plain text mode
in the .cpp
myDialogWithEdits::getValueOfEditOne()
{
return ui->edit1->text();
{
myDialogWithEdits::getValueOfEditOne()
{
return ui->edit1->text();
{
To copy to clipboard, switch view to plain text mode
The in the parent you do:
myDialogWithEdits.exec(); //This will call modal and wait until its closes
//This will be executed after it closes
ui->edit1->setText(myDialogWithEdits.getValueOfEditOne());
QDialog myDialogWithEdits;
myDialogWithEdits.exec(); //This will call modal and wait until its closes
//This will be executed after it closes
ui->edit1->setText(myDialogWithEdits.getValueOfEditOne());
To copy to clipboard, switch view to plain text mode
Carlos
Bookmarks