Ejemplo n.º 1
0
        public T Create <T>(QWidget parentWidget, QObject parent, string keyword, List <QVariant> args) where T : class
        {
            Type type = typeof(T);

            if (!SmokeMarshallers.IsSmokeClass(type))
            {
                throw new Exception("The generic type must be included in the bindings");
            }

            QObject o = Create(SmokeMarshallers.SmokeClassName(type), parentWidget, parent, args, keyword);

            if (o == null)
            {
                return(null);
            }
            T t = qobject_cast <T>(o);

            if (t == null)
            {
                o.Dispose();
            }
            return(t);
        }
Ejemplo n.º 2
0
 public void Dispose()
 {
     _qObject.Dispose();
 }