Orcl User
Orcl User

Reputation: 293

Remove warnings from the console

How to remove warnings such as following warnings from the console:

 QObject::startTimer: QTimer can only be used with threads started with QThread
 QObject::startTimer: QTimer can only be used with threads started with QThread
 QObject::startTimer: QTimer can only be used with threads started with QThread

Update: It is just a guess that it raises because I am using ElementTree to parse an XML document into an element tree:

    def parse(source, parser=None):
   tree = ElementTree()
   tree.parse(source, parser)
   return tree

I would appreciate if you guide me which other parser other than ElementTree i can use..

Upvotes: 0

Views: 787

Answers (1)

It's not a warning, it's an error, and you should not "remove it", you should fix it. It happens because you use QObjects from threads that were not started from a QThread. Probably you're using native python threads. Use QThread instead, and you'll be fine. The XML stuff is a red herring, it seems irrelevant.

Upvotes: 2

Related Questions