Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] How can I share data between a class and a wizard page
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 517 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    roseicollis
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      roseicollis
      wrote on last edited by
      #2

      Solved. Sorry for that silly question.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved