Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2000-04

QT almost working

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

codepunk

Hi,
I almost have the hello world working in QT. I have got the window showing and such but now I have to attach a callback to the widget. Question? which event should I be attaching to the button. I see that clicked and pressed are obsolete so what one am I supposed to attach to a button.

Cliff

Reply by email

codepunk
to Marc Weustink: The LM_[L|M|R]Mouse[Down|Up] events, but you don't have to attach them. This is done by…

Well sort of I have to build a setdata getdata method into the QT engine so that I can place a pointer to the TObject on the widget. I have to do this so that when I recieve a event I can cast it and dispatch the message to winproc.

I am close I should be able to make it work after adding the methods.

Cliff

Marc Weustink wrote 27 lines
At 21:20 15-04-2000 -0500, codepunk wrote: >Hi, > I almost have the hello world working in QT. I have got the window showing >and such but now I have to attach a callback to the widget. Question? which >event should I be attaching to the button. I see that clicked and pressed are >obsolete so what one am I supposed to attach to a button. The LM_[L|M|R]Mouse[Down|Up] events, but you don't have to attach them. This is done by the TControl.AttachSignals. You only have to suport them in TQTObject.SetCallBack (thats probably what you ment ;-) Marc Marc -- OK, It took some time but the is working again. _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Marc Weustink
to codepunk: I almost have the hello world working in QT. I have got the window showing and such but…
codepunk wrote 5 lines
Hi, I almost have the hello world working in QT. I have got the window showing and such but now I have to attach a callback to the widget. Question? which event should I be attaching to the button. I see that clicked and pressed are obsolete so what one am I supposed to attach to a button.

The LM_[L|M|R]Mouse[Down|Up] events, but you don't have to attach them. This is done by the TControl.AttachSignals.

You only have to suport them in TQTObject.SetCallBack (thats probably what you ment ;-)

Marc

Marc

OK, It took some time but the is working again.

Reply by email

Shane Miller
to Marc Weustink

Look at Setprop and GetProp for setting and getting the WinControl and TCOntrol associated with the handle of the window. Maybe you should use that. For gtk, SetProp calls gtk_object_set_data and getprop calls gtk_object_get_data. Getprop and Setprop are winapi calls under windows.

---------------------------------------
Shane Miller
Take a look at other product/projects of mine below!

Get paid to surf the net!
http://alladvantage.com/go.asp?refid=DEX-870

Get paid to surf the net by clicking here too!!!
http://epipo.com/sine.asp?dex870

Home page : http://www.lakefield.net/~smiller

Auto-IP Publisher : http://www.lakefield.net/~smiller/autoip

Advanced Clipboard : http://www.lakefield.net/~smiller/advclipboard

Lazarus : http://www.lazarus.freepascal.org

Earlier message 59 lines
----- Original Message ----- From: "codepunk" To: Sent: Saturday, April 15, 2000 11:27 PM Subject: Re: [lazarus] QT almost working > Well sort of I have to build a setdata getdata method into the QT engine so > that I can place a pointer to the TObject on the widget. I have to do this so > that when I recieve a event I can cast it and dispatch the message to winproc. > > I am close I should be able to make it work after adding the methods. > > Cliff > > > > > On Sat, 15 Apr 2000, Marc Weustink wrote: > > At 21:20 15-04-2000 -0500, codepunk wrote: > > >Hi, > > > I almost have the hello world working in QT. I have got the window showing > > >and such but now I have to attach a callback to the widget. Question? which > > >event should I be attaching to the button. I see that clicked and pressed are > > >obsolete so what one am I supposed to attach to a button. > > > > The LM_[L|M|R]Mouse[Down|Up] events, but you don't have to attach them. > > This is done by the TControl.AttachSignals. > > > > You only have to suport them in TQTObject.SetCallBack (thats probably what > > you ment ;-) > > > > Marc > > > > > > Marc > > > > > > > > -- > > OK, It took some time but the is working again. > > > > _________________________________________________________________ > > To unsubscribe: mail with > > "unsubscribe" as the Subject > > archives at http://www.miraclec.com/list_archives/lazarus > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email