Page 2 of 2

Re: Avances con FiveTouch

PostPosted: Sat Apr 04, 2015 6:03 pm
by jnavas
Cristobal
Tienes el programa tdesign.prg funciando, el que posee genera algunas incidencias.


cnavarro wrote:En el caso de QT, no funciona bien extraer las DATAs de un objeto
Debe ser porque para su lectura o cambio de valor tienen sus correspondientes Methodos
Para ver sus Datas has de usar algo como esto

Code: Select all  Expand view

   oDlg := QDialog()
 
.../...


   oDlgM    := oDlg:metaObject()
   aValores := Array( oDlgM:propertyCount() )
   //MsgInfo( Len( aValores ) )
   oVarsList := QTableWidget()
   oRightLayout:AddWidget( oVarsList )
   WITH OBJECT oVarsList
     
      :setStyleSheet( "border: 0px solid white;" )
      :setRowCount( Len( aValores ) )
      :setColumnCount( 2 )
      :SetHorizontalHeaderItem( 0, QTableWidgetItem( "Property" ) )
      :SetHorizontalHeaderItem( 1, QTableWidgetItem( "Valor" ) )
      For x = 1 to Len( aValores )  
     
         aValores[ x ] := oDlgM:property( x - 1 ):QMetaProperty()
         :SetItem( x-1, 0, QTableWidgetItem( aValores[ x ]:name() ) )
         uVal := oDlg:property( aValores[ x ]:name() ):QVariant()
         :SetItem( x-1, 1, QTableWidgetItem( uVal:typeToName( uVal:type() ) ) )
         // Ya tenemos el nombre, y el tipo de valor que contiene: numérico y string, ahora solo queda obtener el valor
         // Estoy con ello
     Next x
     
   ENDWITH

 


http://doc.qt.io/qt-4.8/qobject.html#Q_PROPERTY

A ver si tienes mas suerte que yo

Image

Re: Avances con FiveTouch

PostPosted: Sat Apr 04, 2015 8:20 pm
by cnavarro
Juan, segun lo que me dices, no se si he entendido bien lo que necesitabas
Has conseguido obtener las DATAS de un objeto?