Marcos, compiled his example with MSVC and MinGW, but show only the fields,
the labels not.

Regards,
Toledo


Marcos Gambeta wrote:
> 
> PCToledo escreveu:
>> But it has as define the size of the fields and the position of labels
>> and
>> fields?
> 
> Remove the widget QFormLayout and use <widget>:move(x,y). To define the 
> length, use the method <widget>:setMaxLength(nLength).
> 
> See sample below:
> 
> [code]
> STATIC FUNCTION PassWord()
> Local oDialog
> Local oLabelMessage
> Local oLabelUser
> Local oLineEditUser
> Local oLabelPassword
> Local oLineEditPassword
> Local oButtonOk
> Local r
> 
>     oDialog := QDialog():New()
>     oDialog:setWindowTitle("Login")
>     oDialog:resize(210,130)
> 
>     oLabelMessage := QLabel():New( QT_PTROF(oDialog) )
>     oLabelMessage:setText("Enter your password...")
>     oLabelMessage:move(10,10)
> 
>     oLabelUser := QLabel():New( QT_PTROF(oDialog) )
>     oLabelUser:setText("User")
>     oLabelUser:move(10,30)
> 
>     oLineEditUser := QLineEdit():New( QT_PTROF(oDialog) )
>     oLineEditUser:setMaxLength(15)
>     oLineEditUser:move(60,30)
> 
>     oLabelPassword := QLabel():New( QT_PTROF(oDialog) )
>     oLabelPassword:setText("Password")
>     oLabelPassword:move(10,60)
> 
>     oLineEditPassWord := QLineEdit():New( QT_PTROF(oDialog) )
>     oLineEditPassWord:setEchoMode(2)
>     oLineEditPassWord:setMaxLength(15)
>     oLineEditPassword:move(60,60)
> 
>     oButtonOk := QPushButton():New(QT_PTROF( oDialog ))
>     oButtonOk:setText("OK")
>     oButtonOk:move(100,90)
>     Qt_Connect_Signal( QT_PTROF(oButtonOk), "clicked()", 
> {||IIF(oLineEditUser:text()=="user".and.oLineEditPassword:text()=="password",oDialog:done(1),oDialog:done(0))
>  
> })
> 
>     r := oDialog:exec()
> 
> Return IIF(r==1,.t.,.f.)
> [/code]
> 
> 
> -- 
> Regards,
> Marcos Antonio Gambeta
> _______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour
> 
> 


-----
Toledo
http://www.pctoledo.com.br/forum http://www.pctoledo.com.br/forum 
-- 
View this message in context: 
http://old.nabble.com/Window-Main-X-Window-Modal-X-HBQT-tp26818868p26847599.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to