Lo bueno de QT es que hay muchos ejemplos en google ![]()
Lo bueno de QT es que hay muchos ejemplos en google ![]()
Si, Antonio ojala sea útil a muchos, estoy tratando de usar QT extrayendo texto desde DBF no he encontrado ejemplo semejante
si tu me pudieras guiar te lo agradeceré desde ya
Un Abrazo fraterno
Jairo
Jairo,
Si muestras aqui tu código ó explicas lo que intentas hacer, buscaremos la forma de ayudarte
#include "FiveTouch.ch"
*--------------
FUNCTION Main()
*--------------
local oDlg
local hCtrl := { => }
USE .\data\test
DEFINE DIALOG oDlg SIZE 250, 400 TITLE "Test DBF"
DEFINE BAR oQToolBar OF oDlg
DEFINE BUTTONBAR hCtrl[ 'btn_exit' ] OF oQToolBar IMAGE 'bmp\exit.bmp' ;
ACTION Quit();
TOOLTIP 'Exit'
DEFINE SEPARATOR OF oQToolBar
DEFINE BUTTONBAR hCtrl[ 'btn_top' ] OF oQToolBar IMAGE 'bmp\top.bmp' ;
ACTION Navigator( 'top', hCtrl );
TOOLTIP 'Top table'
DEFINE BUTTONBAR hCtrl[ 'btn_prev' ] OF oQToolBar IMAGE 'bmp\prev.bmp' ;
ACTION Navigator( 'prev', hCtrl );
TOOLTIP 'Previous register'
DEFINE BUTTONBAR hCtrl[ 'btn_next' ] OF oQToolBar IMAGE 'bmp\next.bmp' ;
ACTION Navigator( 'next', hCtrl );
TOOLTIP 'Next register'
DEFINE BUTTONBAR hCtrl[ 'btn_bottom' ] OF oQToolBar IMAGE 'bmp\bottom.bmp' ;
ACTION Navigator( 'bottom', hCtrl );
TOOLTIP 'Bottom table'
@80, 10 SAY oSay PROMPT "First" OF oDlg
@110, 10 SAY oSay PROMPT "Last" OF oDlg
@140, 10 SAY oSay PROMPT "Age" OF oDlg
@80, 100 GET hCtrl[ 'first' ] VAR '' OF oDlg
@110, 100 GET hCtrl[ 'last' ] VAR '' OF oDlg
@140, 100 GET hCtrl[ 'age' ] VAR '' OF oDlg
hCtrl[ 'age' ]:resize( 40, 20 )
@180, 40 IMAGE hCtrl[ 'image' ] FILE 'dvd.png' SIZE 170, 200 OF oDlg
ShowData( hCtrl )
ACTIVATE DIALOG oDlg
DbCloseAll()
return nil
*---------------------------------------
STATIC FUNCTION Navigator( cCmd, hCtrl )
*---------------------------------------
DO CASE
CASE cCmd == 'top' ; DbGoTop()
CASE cCmd == 'bottom' ; DbGoBottom()
CASE cCmd == 'next'
if !eof()
DbSkip()
endif
CASE cCmd == 'prev'
DbSkip(-1)
ENDCASE
ShowData( hCtrl )
retu nil
#define F_FIRST 1
#define F_LAST 2
#define F_AGE 9
*--------------------------------
STATIC FUNCTION ShowData( hCtrl )
*--------------------------------
LOCAL nRecno := Recno()
LOCAL cFile := 'data\cara' + ltrim(str(nRecno)) + '.bmp'
hCtrl[ 'first' ]:SetText( FieldGet( F_FIRST ) )
hCtrl[ 'last' ]:SetText( FieldGet( F_LAST ) )
hCtrl[ 'age' ]:SetText( Str( FieldGet( F_AGE ), 2 ) )
hCtrl[ 'image' ]:SetPixmap( QPixmap( cFile ) )
retu nil Antonio buen dia
Gracias, como siempre entendiendo los que vamos buscando los caminos recorridos por ustedes
Cordialmente
Jairo