Work very good !!!  Many Thanks

This is my sample for test:

*#include "hbqt.ch"*
*
*
*REQUEST HB_QT*
*
*
*STATIC s_qApp*
*
*
*STATIC pEvents*
*
*
*/*----------------------------------------------------------------------*/*
*
*
*INIT PROCEDURE Qt_Start()*
*
*
*   hbqt_errorsys()*
*
*
*   s_qApp := QApplication():new()*
*   RETURN*
*
*
*EXIT PROCEDURE Qt_End()*
*   s_qApp:quit()*
*   RETURN*
*
*
*/*----------------------------------------------------------------------*/*
*
*
*PROCEDURE Main()*
*   Local oLabel, oDA, oWnd, oTextBox1, oTextBox2*
*
*
*   pEvents := QT_EVENTS_NEW()*
*
*
*   oWnd := QMainWindow():new()*
*   oWnd:setWindowTitle( "Harbour-Qt Implementation Test Dialog" )*
*   oWnd:resize( 900, 500 )*
*   oDA    := QWidget():new( oWnd )*
*   oWnd:setCentralWidget( oDA )*
*
*
*   oLabel := QLabel():new( oWnd )*
*   oLabel:setText( "Label" )*
*   oLabel:move( 150 , 150 )*
*   oLabel:resize( 100 , 100 )*
*   oLabel:show()*
*
*
*   oTextBox1 := QTextEdit():new( oWnd )*
*   oTextBox1:Move( 5, 7 )*
*   oTextBox1:Resize( 300,30 )*
*   oTextBox1:setPlainText( "TextBox" )*
*   oTextBox1:Show()*
*
*
*   oTextBox2 := QTextEdit():new( oWnd )*
*   oTextBox2:installEventFilter( pEvents )*
*   oTextBox2:Move( 5, 60 )*
*   oTextBox2:Resize( 300,30 )*
*   oTextBox2:setPlainText( "This is the TextBox for check Focus" )*
*   oTextBox2:Show()*
*   Qt_Events_Connect( pEvents, oTextBox2 , QEvent_FocusIn, {||
oLabel:setText( "FocusIn" ) } )*
*   Qt_Events_Connect( pEvents, oTextBox2 , QEvent_FocusOut, {||
oLabel:setText( "focusout" ) } )*
*
*
*   oWnd:Show()*
*
*
*   s_qApp:exec()*
*
*
*   RETURN*

Thanks and regards
CdQ


On Fri, Feb 26, 2010 at 5:39 PM, Pritpal Bedi <bediprit...@hotmail.com>wrote:

>
>
> CarozoDeQuilmes wrote:
> >
> > Hi Pritpal, are implemented the FocusIn and FocusOut events in widget
> (not
> > Windows, it work fine for my), for example TextBox ???
> >
>
> Try something like:
>
>   #include "hbqt.ch"
>
>   pEvents := Qt_Events_New()
>
>   qWidget := QWidget():new()
>
>   qWidget:installEventFilter( pEvents )
>
>   Qt_Events_Connect( pEvents, qWidget, QEvent_FocusIn, {|| ProcessEvent(
> QEvent_FocusIn ) } )
>
>
> Please post your results here.
>
>
> -----
>                 enjoy hbIDEing...
>                    Pritpal Bedi
> _a_student_of_software_analysis_&_design_
> --
> View this message in context:
> http://n2.nabble.com/FocusIn-and-FocusOut-in-widgets-tp4641452p4641699.html
> Sent from the harbour-devel mailing list archive at Nabble.com.
> _______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> Harbour@harbour-project.org
> http://lists.harbour-project.org/mailman/listinfo/harbour
>
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to