[SOLVED] QSocketNotifier: Can only be used with threads started with QThread



  • My application is coded with qt4
    i added this to the .pro file @QT += widgets@

    to remove the #include errors on qt5.

    Now i have this warning:
    @Starting /home/citybong/Downloads/build-wallch-Desktop-Debug/wallch...
    QSocketNotifier: Can only be used with threads started with QThread
    QSocketNotifier: Can only be used with threads started with QThread@

    which i don't know what it is, what causes it, and how to fix it.



  • I am trying to build a project here which doesn't even use the QSocketNotifier library.

    What?


  • Lifetime Qt Champion

    But internally it might be used.

    That question might find better answer on the mailing list (you'll find Qt's developers/maintainers there, this forum is more user oriented)



  • If it is internally used (by some other library) and that causes the problem, then I don't have control over it! Why does it complain to me?


  • Moderators

    [quote author="alexandros" date="1375132190"]If it is internally used (by some other library) and that causes the problem, then I don't have control over it! Why does it complain to me?[/quote]Because it needs you to use your classes differently.



  • Hi, normally, the error will occur when you access a non-thread-safe object which is created in another thread, in other words, wrong usage of QThread will cause this problem.



  • Well apparently it had something to do with QFileSystemWatcher
    Fixed ;)


Log in to reply
 

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