[Qt-interest] declaring QString globally

Hong Jiang kmldqj at gmail.com
Mon Nov 2 22:44:31 CET 2009


You could create a repoTextChanged(const QString&) signal and connect
that to any object that needs to use the string. (I would change the
design. But it's a simple way to do what you want without much change
to your existing code.)

On Mon, Nov 2, 2009 at 12:49 PM, Mystical Groovy <mysticalgr at gmail.com> wrote:
> hello all,
>
> I have a question
>
> I have 3different classes on my app,
> lets say
>
> mainclass.cpp/h, preferencesdialog.cpp/h, checkrepo.cpp/h
>
> mainclass contains the main GUI where theres a slot that calls a Preferences
> Dialog from preferencesdialog class, now in the Preferences dialog the user
> add a string into a box, the user-input text is save on "repoText" QString,
> how can i use "repoText" qstring into checkrepo class?
>
>
> for example, checkrepo class is activated via mainclass GUI and theres a
> messagebox that shows "repoText" to the user. where "repoText" is declared
> into preferencesdialog class.
>
> I hope you understand what im asking, oh and btw, sry for my english ;)
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>



More information about the Qt-interest-old mailing list