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

List:       kde-edu-devel
Subject:    Re: [Kde-edu-devel] trivial help needed
From:       Eva Brucherseifer <eva () kde ! org>
Date:       2001-10-06 11:10:39
[Download RAW message or body]


Hi annma,

On Samstag, 6. Oktober 2001 12:41, Anne-Marie Mahfouf wrote:
> Hi edu developers
>
> I have a class
> class addRule : public addRuleDlg
> and a public QString variable called rule in that class ( QString rule;)
> I have another class
> class learnWords : public learnDlg
> in which I want to use the rule variable
> When I try
> label1->setText(addRule().rule);
> nothing happens
>

I don't understand what your function "addRule()" does (since addRule is a 
class), but I would add a Method to the class addRule to receive the function:

QString rule() {return rule;}

usually, if you have such a property in a class you also have a method to set 
the property:

void setRule(QString& newrule) {rule = newrule;}

I don't know how your code structure is. How to you get access to the Object 
of type addRule? do you have a pointer somewhere? You'd then call

label1->setText(myAddRule->rule());

Greetings,
eva

> I know this is kinda trivial but.......
>
> Cheers,
_______________________________________________
Kde-edu-devel mailing list
Kde-edu-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-edu-devel

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

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