AUTOLOAD in widget subclass?

  • Richard Evans
    Richard Evans


    Is it possible to get AUTOLOAD functionality in a widget subclass?

    I've got a component that I would like to behave like a Qt::ListBox. Because its a component, it doesn't inherit from Qt::ListBox, and I currently have to define each method explicity eg:

    sub firstItem
      return list_box->firstItem;

    Obviously AUTOLOAD would be the answer, but I appreciate this is the mechanism underlying the existing PerlQt code, and just stuffing an AUTOLOAD sub in the module doesnt appear to work. Is there any solution to this, real or theoretical :)

    Many thanks,