Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. threads
    Log in to post

    • UNSOLVED QSqlDatabase and upgrade to Qt5.12
      General and Desktop • qsqldatabase qt5.9 threads qt5.12 • • Alain38 0  

      2
      0
      Votes
      2
      Posts
      21
      Views

      @Alain38-0 said in QSqlDatabase and upgrade to Qt5.12: Unfortunately with Qt5.12 nothing works. Because the database must be now in the same thread that the process using it. I'm surprised it used to work at all. So far as I understood, it was always the case that database access had to be in same thread as where database created.
    • SOLVED How do I send text from one thread to main GUI?
      General and Desktop • threads signal&slot messages • • rjmoses  

      5
      0
      Votes
      5
      Posts
      144
      Views

      @mrjj Thank you, thank you, thank you. It is always a pleasure to work with someone who knows their stuff. I had overlooked the step of connecting FortuneServer's signal to Dialog's slot in the dialog. I added in dialog.cpp: connect(&server, SIGNAL(connectionMade(QString)), this, SLOT(setConnectionText(QString)) ); Once I put this in, it worked like a champ! Marking it solved. Thanks again.
    • SOLVED Connect() returns true but SLOT function is not working
      General and Desktop • threads connect problem qt gui callback • • R_Irudezu  

      2
      0
      Votes
      2
      Posts
      285
      Views

      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
    • UNSOLVED bluetooth LE receive bandwidth
      General and Desktop • performance ble threads • • efiLabs  

      1
      0
      Votes
      1
      Posts
      169
      Views

      No one has replied

    • UNSOLVED QApplication in non-main thread
      General and Desktop • qapplication threads cleanup • • AboveL  

      1
      0
      Votes
      1
      Posts
      658
      Views

      No one has replied

    • UNSOLVED How to run a thread again?
      General and Desktop • thread threading threads ui object • • xLlama  

      4
      0
      Votes
      4
      Posts
      1136
      Views

      Hi, The terminate as it names suggest kills the the thread so it's state is not guaranteed as mentioned in the documentation. Not that you are automagically destroying everything once your operation is done. See your connections to the deleteLater slots.
    • UNSOLVED how to run two threads simultaneously without waiting for another thread in qt
      Mobile and Embedded • qtcreator qt4 threads multithreading • • AnnieAlbert  

      12
      0
      Votes
      12
      Posts
      5256
      Views

      You're welcome ! Since you have it working now, please mark that thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)
    • UNSOLVED QThread - threads how to kill all of them?
      General and Desktop • threads qthreads • • qDebug  

      14
      0
      Votes
      14
      Posts
      5429
      Views

      After a lot of try and error, mostly error and crashes, i ended up with this working solution: foreach(FTPDownload* w, g_Worker) { if(w->_working) { w->abort(); // sets _working = false and _abort = true w->ftp->deleteLater(); // ends the QFtp download w->thread()->quit(); w->thread()->deleteLater(); } } The only problem left is when i remove the table from the QTableView the progress update wont terminate and the app crashes, because the table does not exist anymore. I guess i have to add the the function that executes the code from above somehow in a event loop so the code after that deletes the table wont be executed before all the downloads are really stopped. Right?
    • SOLVED Thread with no event loop, detect an exit event
      General and Desktop • threads event loop best practice • • Northsoft  

      6
      0
      Votes
      6
      Posts
      1585
      Views

      @kshegunov thanks a lot!
    • SOLVED Signals/slots accross threads
      General and Desktop • threads signals slots • • mistralegna  

      7
      0
      Votes
      7
      Posts
      5564
      Views

      @mistralegna Thanks, it's exactly the answer I was waiting for. I'm glad. :D Thank you a lot for your answers! You're welcome.
    • Problem with program that performs multiple processes.
      General and Desktop • python gui thread pyqt qtdesigner python3 threading pyqt4 threads multithreads pyuic • • Tas-sos  

      3
      0
      Votes
      3
      Posts
      1936
      Views

      How can i create my signal for text edit with python3 ? With as many ways i tried, but I did not succeed .. :(
    • QObject delete order in multi-threaded application
      General and Desktop • delete parent threads destroy • • s.frings74  

      4
      0
      Votes
      4
      Posts
      1483
      Views

      @SGaist said: Hi, @SysTech : deleteLater won't remove things when the thread is done, but at the next event loop iteration. Thanks. I wasn't exactly sure when it deleted it but good to know!
    • How to FINALLY do asynchronous background worker with QThread
      General and Desktop • qthread thread threads asynchronous parallel • • Viktor Jamrich  

      12
      1
      Votes
      12
      Posts
      4974
      Views

      @JKSH Oh, did not catch that difference. Thank you.
    • Πρόβλημα με πρόγραμμα που εκτελεί πολλές διεργασίες.
      Greek • python gui thread pyqt threading pyqt4 threads multithreads • • Tas-sos  

      1
      0
      Votes
      1
      Posts
      1234
      Views

      No one has replied

    • [SOLVED]Can't connect signal to slot with QVector arguments
      General and Desktop • qt creator signal & slot connect threads qt 5.4.0 • • Preston_H  

      6
      0
      Votes
      6
      Posts
      5526
      Views

      I would have expected that all Qt type are already registered. However, this is a template which you registered with template argument. That is presumably the reason. A template delivers infinite possibilities. I did not know.
    • Using QThread with minimal usage of signals/slots
      General and Desktop • qtcreator threads qt 5.4.0 • • Preston_H  

      5
      0
      Votes
      5
      Posts
      1832
      Views

      Yep, you've helped me realize that this is one of those cases where it's not worthwhile to reinvent the wheel. Thanks for your help!
    • [SOLVED]Delay function leads to Exception in new thread
      General and Desktop • threads qcoreapplicatio qeventloop delay exception • • Sen Li  

      6
      0
      Votes
      6
      Posts
      4387
      Views

      @ChrisW67 Thank you for you help. Probably the thing is, QSerialPort has a problem to work in a new thread. I can handle the other QObject in a new thread very well, and the exception only happens when the Object contains QSerialPort. Also, in my last post, I actually never user QList, although Qt tells me something wrong with QList. I have given up on working serialThread. QSerialPort does work good in the main thread.
    • [SOLVED]Possible? Multiple QSerialPort Threads Simultaneously Independently
      General and Desktop • qserialport threads terminal multiple independent simultaneously • • Sen Li  

      18
      0
      Votes
      18
      Posts
      6786
      Views

      @SGaist Thank you very much for your tips! I probably should give up on the serial thread. It is beyond my ability to play with that problem.
    • Aprendiendo a usar QThreadPool
      Spanish • c++ threads hilos • • Jonathan77  

      2
      0
      Votes
      2
      Posts
      945
      Views

      Hace poco tuve que usar QThreadPool, el uso básico sería este: // Puede ser una función tradicional o un método estático. // func puede recibir hasta un máximo de 5 parámetros. void func(QMutex *mutex, otrosParametros) { mutex->lock(); // Hacer lo que haya que hacer aquí. mutex->unlock(); } int N = 1000; QThreadPool threadPool; // El mutex se usa para bloquear la modificación simultanea // de prametros globales. QMutex mutex; for (int i = 0; i < int; i++) { QtConcurrent::run(&threadPool, func, &mutex, otrosParametros); } threadPool.waitForDone(); // Hacer algo con el resultado de los threads.