5

I'm getting the following error with just a very basic application and with no sockets or anything fancy:

QSocketNotifier: Can only be used with threads started with QThread

Machine:

  • Fedora 32 (Workstation Edition)
  • Python 3.8
  • PyQt5
  • Fedora is inside VirtualBox
  • Host is Windows 10

From Script.py

#!/usr/bin/python3.8
from PyQt5.QtWidgets import QApplication, QLabel
app = QApplication([])
label = QLabel('Hello World!')
label.show()
app.exec_()
BrnVrn
  • 80
  • 7
Josh
  • 700
  • 5
  • 14
  • 1
    Does that warnning still run the script correctly? – eyllanesc Mar 19 '20 at 16:34
  • @eyllanesc From what I can tell I think so. – Josh Mar 19 '20 at 16:41
  • So bypassing that warning, perhaps you find an inconsistent one because VB doesn't emulate all the OS features that Qt needs. – eyllanesc Mar 19 '20 at 16:43
  • @eyllanesc are you suggesting this is an issue with VirtualBox? Do you know for sure? I don't have any other linux platform to test this on right now. – Josh Mar 19 '20 at 16:44
  • I use Qt with linux and I have not observed these problems, and clearly that message is internal to Qt that tries to verify something but that due to emulation does not synchronize at the time of the "assert" – eyllanesc Mar 19 '20 at 16:46
  • @eyllanesc would you mind running this exact code on your machine and see if the error shows up? If it doesn't, then I can go ahead and upvote your response. Thanks – Josh Mar 19 '20 at 16:49
  • As I said, I already tested your code which is trivial and I don't see that error. – eyllanesc Mar 19 '20 at 16:52
  • I have the same error message running on Fedora 32 (no virtualization). I can say it is related to Wayland as running the following does not produce errors: env QT_QPA_PLATFORM=xcb python3 script.py – BrnVrn Apr 05 '20 at 19:06
  • https://stackoverflow.com/a/69007960/14950238 maybe this helps – Ceopee Sep 20 '21 at 05:06

0 Answers0