1

Currently trying to launch a Qt application on a wayland platform, without success. I succeeded to launch other basic apps such as a calculator or a paint sample. But my app get the following error :

QSocketNotifier: Can only be used with threads started with QThread

I can't find the cause of this error. Tried to launch the app with the env variable "qt.qpa.plugin" using the following values : wayland-egl, wayland, wayland-xcomposite-egl getting always the same error.

What kind of behavior triggers this error ?

Greg
  • 579
  • 5
  • 26
  • 1
    Are you using QSocketNotifier? If so can you post relevant code? – Developer Paul Apr 12 '19 at 12:38
  • I did not found a QSocketNotifier in the project. Maybe it is a part of other objects used by qt, I will look in this way – Greg Apr 12 '19 at 12:41
  • 1
    [This](https://forum.qt.io/topic/29587/solved-qsocketnotifier-can-only-be-used-with-threads-started-with-qthread) might be relevant? – Developer Paul Apr 12 '19 at 12:42
  • Yep, It could be a Thread-Safety related issue as stated in the article. Thanks for finding this topic, I missed this one. – Greg Apr 12 '19 at 12:45
  • 1
    FYI: The name of the env var is `QT_QPA_PLATFORM` (uppercase and underscores), but I don't think it shoud matter in this case... You should try to create a minimal failing example and post it on https://bugreports.qt.io – bobbaluba Apr 17 '19 at 09:12

0 Answers0