Hi!
TSelectDirectoryDialog doesn't close after Execute.
The window closes only after the entire loop code below has been executed.
I noticed this behavour is under qt5 only.
Under gtk2 works fine.
Please suggest a solution for qt5.
The part of my code:
if sDir.Execute then begin
// here the dialog should close but remains open
sDir.Close; // This also doesn't help
Application.ProcessMessages; // I tried this but it doesn't help
dt := Now;
m1.Clear;
m1.Lines.Add('Analizuję folder: '+sDir.FileName);
FileList := TStringList.Create;
FindAllFiles(FileList, sDir.FileName, '*.mst', False);
if FileList.Count=0 then begin
FileList.Free;
m1.Lines.Add('Brak plików w folderze.');
Exit;
end;
Screen.Cursor := crHourGlass;
sd := FormatDateTime('YYYYMMDD', dt1.Date);
m1.Lines.Add('Search date is: '+sd);
SQLQuery := TStringList.Create;
for FileName in FileList do begin
sb1.SimpleText := FileName;
sb1.Repaint;
try
CSVDoc := TCSVDocument.Create;
with CSVDoc do begin
Delimiter := ',';
...
...
Lazarus 3.6, FPC 3.2.2, Linux Debian Trixie, Gnome