Important: Please read the Qt Code of Conduct -

What is QThread::loopLevel()?

  • Hi, while browsing through the documentation of QThread I came across int QThread::loopLevel() const, the only explanation for it is: Returns the current event loop level for the thread. What does this return value mean? I tried searching for it but there is no mention of 'Loop Level' (or any kind of Level) in QEventLoop or QEvent class.

  • Returns the number of event loops running in that thread.

    QThread::exec() spawns an event loop, if you then create other QEventLoops in this thread and exec() them then this count will increase

Log in to reply