lineEdit show in other form as label
hi all,
i have the following problem: i have a mainWindow and a 1.ui form which opens if i press a button in the mainWindow.
on 1.ui i have an button (something like "add new item") which opens another form (2.ui) where information could be entered as text in lineEdit. 2.ui has a Save and a Cancel button.
as soon as I press Save, i would like to show the information inserted in the lineEdit in form 1.ui, as a label.
any suggestions how to do it?
thanks for your input.
Re: lineEdit show in other form as label
There are several ways to do that:
1) manipulate a shared data structure
2) let the second class emit its data on OK
3) let the first class retrieve the data from the second class using getter methods
Cheers,
_
Re: lineEdit show in other form as label
hi,
Quote:
There are several ways to do that:
1) manipulate a shared data structure
2) let the second class emit its data on OK
3) let the first class retrieve the data from the second class using getter methods
could you please let me know where I should start reading about these methods? i need a starting point. no info found so far.
thanks.
Re: lineEdit show in other form as label
(1) and (2) are standard C++ features so they are most likely covered in all non-trivial C++ tutorials out there.
For (2) see http://qt-project.org/doc/qt-5.0/qtc...sandslots.html
Cheers,
_