I have been trying to create a dialog with qtada.
After many attempts I have been unable to get it to work.
The project always builds OK but when I try to run it I always get:

Object::connect: No such slot tDialog::findClicked()
raised QT4.CONNECT_ERROR : qt4-objects.adb:193

This problem happens with any local slots that I try to connect to.

I have been able to successfully build and run all of the qtada tutorial 
projects.
Following is relevant code excerpts from my dialog project:

find_dialog.ads:
with statements----
-
Package Find_Dialog is
   type tDialog is limited new Qt4.Dialogs.Q_Dialog with private;
   type tDialog_Access is access all tDialog'Class;
   package Constructors is
      function Create_Dialog return not null tDialog_Access;
   end Constructors;
procedure Find_Next (Self     : not null access tDialog'Class;
                        a_String : Qt4.Strings.Q_String'Class;
                        cs       : Qt4.Case_Sensitivity);
   procedure Line_Edit (Self     : not null access tDialog'Class;
                        a_String : Qt4.Strings.Q_String'Class;
                        cs       : Qt4.Case_Sensitivity);
   pragma Q_Signal (Find_Next);
   pragma Q_Signal (Line_Edit);
private
   type tDialog is new Qt4.Dialogs.Directors.Q_Dialog_Director
   with record
      Case_Check_Box     : Qt4.Check_Boxes.Q_Check_Box_Access;
      Backward_Check_Box : Qt4.Check_Boxes.Q_Check_Box_Access;
      Find_Button        : Qt4.Push_Buttons.Q_Push_Button_Access;
      Close_Button       : Qt4.Push_Buttons.Q_Push_Button_Access;
      Label              : Qt4.Labels.Q_Label_Access;
      Line_Edit          : Qt4.Line_Edits.Q_Line_Edit_Access;
   end record;
   procedure Find_Clicked(Self : not null access tDialog'Class);
   pragma Q_Slot (Find_Clicked, "findClicked()");
   procedure Enable_Find_Button (Self : not null access tDialog'Class);
   pragma Q_Slot (Enable_Find_Button);
end Find_Dialog;

find_dialog.adb:
-
-
Package body Find_Dialog is
  package body Constructors is
   function Create_Dialog return not null tDialog_Access is
      Self            : constant tDialog_Access := new tDialog;
-
-
      Self.Find_Button := Qt4.Push_Buttons.Constructors.Create
                            (Qt4.Strings.From_Utf_16 ("Find"));
      Self.Close_Button := Qt4.Push_Buttons.Constructors.Create
           (Qt4.Strings.From_Utf_16 ("Close"));
-
-
      Qt4.Objects.connect (Self.Find_Button, Qt4.Signal ("clicked()"),
                           Self, Qt4.Slot ("findClicked()"));
      Qt4.Objects.Connect (Self.Close_Button, Qt4.Signal ("clicked()"),
                           Self, Qt4.Slot ("close()"));
      return Self;
   end Create_Dialog;
-
-
when I comment out the findClicked connect statement, the program runs OK, the 
dialog is correctly displayed and the Close button works correctly.

Regards
Roger
_______________________________________________
qtada-users mailing list
[email protected]
http://box347.bluehost.com/mailman/listinfo/qtada-users_lists.qtada.com

Reply via email to