Skip to content
QtWS25 Last Chance
  • GUI change with signal and slot

    Unsolved General and Desktop qt creator qt gui qthread
    9
    0 Votes
    9 Posts
    705 Views
    jsulmJ
    @duckrae First remove all that thread stuff
  • 0 Votes
    2 Posts
    2k Views
    R_IrudezuR
    i did a very bad mistake... The mistake is creating two instance of workerThread class, so connection returns true because of the instance of workerThread is just emitting but other instance is just connecting. So it needs to be only one instance and one connection in my case. added to workerthread.h: extern workerThread *t1; changed in workerthread.cpp emit t1->sendLocationsFromThread(x, y, w, h); changed in mainwindow.cpp bool callBackThreadConn = connect(w1, SIGNAL(sendLocationsFromThread(int, int, int, int)), this, SLOT(onLocationChanged(int, int, int, int))); it's ok now, data can be send to GUI
  • How to remove the mapper's item?

    Unsolved General and Desktop qt gui signalmapper
    5
    0 Votes
    5 Posts
    2k Views
    kshegunovK
    @SGaist said: Why will it not work ? AFAIK that's the goal of QSignalMapper: to map several objects to one signal with a parameter of known value. I seem to have missed my morning coffee when I wrote that. Sure it will work.