[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    Re: [Kde-bindings] Qt, Qyoto buttons work intermediately
From:       linuxoidoz () yahoo ! com ! au
Date:       2010-02-20 15:33:56
Message-ID: 201002210133.56744.linuxoidoz () yahoo ! com ! au
[Download RAW message or body]

> Nope, it's the same in Qt. To be more precise, in C# you would do (pseudo-
> code):
> 
> button.Clicked += onButtonOkClicked;
> ...
> onButtonOkClicked() {
> 	ChangeText(str1);
> }
> ChangedText(string str) {
> 	txtEdit.Text = str;
> }
> 
> In Qt it's exactly the same:
> 
> Connect(button, SIGNAL("clicked()"), this, SLOT("onButtonOkClicked()");
> ...
> onButtonOkClicked() {
> 	ChangeText(str1);
> }
> ChangedText(string str) {
> 	txtEdit.Text = str;
> }
> 
> What you were trying to do with your Connect() statement above is similar to 
> doing this in C#:
> 
> button.Clicked += onButtonOkClicked(myStringHere);
> 
> which will obviously NOT work.
> Remember, connecting signals and slots is just the same as subscribing to a C# 
> event.
> 
> 
Oooooooooooooh, NOW I got it! Why didn't you tell me of "button.Clicked += \
onButtonOkClicked;" before? Now it makes all sense. Thank you, guys. I should take it \
from here. Thanks a lot again. _______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic