I am very new to qtada - so bear with me.
I am trying to select a directory. The following is my program. It does
allow selection of files.
The Platform is Windows XP.
----------------------------
with Qt_Ada.Application;
with Qt4.Strings ;
with Text_Io; use Text_Io;
with Qt4.File_Dialogs ; use Qt4.File_Dialogs ;
with Qt4.Widgets ;
with Qt4.Main_Windows ;
with Qt4.Main_Windows.Constructors ;
with Qt4.Message_Boxes ;
procedure Main is
begin
Qt_Ada.Application.Initialize;
declare
Widget : constant not null access Qt4.Widgets.Q_Widget'Class
:= Qt4.Main_Windows.Constructors.Create;
Concert_Dir : Qt4.Strings.Q_String :=
Qt4.File_Dialogs.Get_Open_File_Name(
Caption =>
Qt4.Strings.From_Utf_8("Concert Directory") ,
Opts => +Show_Dirs_Only );
begin
Qt4.Message_Boxes.About( Widget , Concert_Dir , Concert_Dir ) ;
-- Widget.Show ;
end;
end Main;
----------------------------
Project File is :
------------------------------
with "qt_gui";
project getdir is
for Main use ("main.adb");
for Source_Dirs use (".");
for Object_Dir use ".objs";
for Exec_Dir use ".";
package Compiler is
for Default_Switches ("Ada") use ("-g", "-gnat05");
end Compiler;
end getdir ;
------------------------------
Looking for help. Thanks, srini
--
r srinivasan
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.qtada.com/pipermail/qtada-users_lists.qtada.com/attachments/20090305/a1a03e9d/attachment.html>
_______________________________________________
qtada-users mailing list
[email protected]
http://lists.qtada.com/mailman/listinfo/qtada-users_lists.qtada.com