[Solved] How can I share data between a class and a wizard page



  • Hi,

    I am making a wizard app. Until now, I was passing some information between wizardpages using registerfield. For other information with no widgets I passed this information registering new properties with Q_PROPERTY and then passing the wizardpage as the widget, but now I need to do some background work. For that I created a Worker class like this:

    @
    class Worker : public QObject
    @

    And I call it like this:
    @
    thread = new QThread();
    thread->start();
    worker = new Worker;

    worker->moveToThread(thread);
    connect(this, SIGNAL(RequestJson()),worker, SLOT(doJsonRequest()));
    

    @

    So in the worker I have the next slot:
    @
    void Worker::doJsonRequest()
    {

    [...]// do JSon request and get a QString with the information
    }
    @

    Until here its all ok but... Once I have that QString on doJsonRequest(), how can I use it in my wizardpage or access to it?? The worker class isn't a wizardpage so I can't use registerfield.... O.o

    Thank you.



  • Solved. Sorry for that silly question.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.