[Qt] Qt progress
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Tue Jan 30 04:32:27 CET 2007
I sligtly modifyed the app to have 2 buttons. One to read the
checkboxes from the other form, and another to show it.
It seams that when you show a modal form, Qt simply won't store what
changed on the checkboxes. If you use just Show instead of Show modal,
it will store the values correctly.
Looks like a Qt normal behavior. Maybe it's configurable, maybe it's a
Qt bug. ShowModal code is very trivial, and there is nothing wrong
with our checkboxes.
Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
Form2.ShowModal;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
MsgStr : string;
begin
if Form2.CheckBox1.Checked then
MsgStr := 'CheckBox1 is checked. '
else
MsgStr := 'CheckBox1 is not checked. ';
if Form2.CheckBox2.Checked then
MsgStr := MsgStr + 'CheckBox2 is checked.'
else
MsgStr := MsgStr + 'CheckBox2 is not checked.';
Label1.Caption := MsgStr;
end;
--
Felipe Monteiro de Carvalho
More information about the Qt
mailing list