[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:12:31
Message-ID: 201002210112.31714.linuxoidoz () yahoo ! com ! au
[Download RAW message or body]
> That sounds more like programming issues in general than Qt issues.
>
> 1) sounds like a bit of a bad idea in general - more sensible would be
> to have the StartWindow fire an event, have the MainWindow subscribe to
> the event, and then have a method in the MainWindow add the page when
> the event occurs. That way the pages are only concerned with their own
> stuff, not with other things.
>
> 2) Probably the same - keep things separated so that the page doesn't
> know about the construction of the main window, but use events so that
> the main window can do whatever it needs to.
>
> Tight coupling, like it sounds like you have, is generally going to
> cause you problems in the long run :)
>
Well, there may be programming issues, but what I'm trying to figure out is purely Qt - how do \
you pass a variable in a signal/slot?
In normal C# you would do:
onButtonOKClicked() {
string str1 = "string";
ChangeText(str1);
}
ChangeText (string str2) {
txtEdit.Text = str;
}
but in Qt this doesn't work:
signal(btnOK, SIGNAL("clicked()"), this, SLOT("ChangeText(str1)")); - it says no such slot
This is all I'm trying to figure out - how do you pass a value in a signal/slot?
_______________________________________________
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