Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. A bug? QBasicTimer::start: QBasicTimer can only be used with threads started with QThread
Qt 6.11 is out! See what's new in the release blog

A bug? QBasicTimer::start: QBasicTimer can only be used with threads started with QThread

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 6.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    QtTester
    wrote on last edited by QtTester
    #1

    Hi,all:
    I have encountered an interesting problem.

    Qt5.14.1 + VS2017 32bit + Win 10

    I have a exe project and an MainWindow project. exe to show MainWindow.

    Scene 1: exe + QPluginLoader(MainWindow), call MainWindow as a qt plugin, when i close ,it says:

    QBasicTimer::start: QBasicTimer can only be used with threads started with QThread
    

    especially when you drag a QComboBox to the ui.
    without QComboBox, it says nothing.

    Scene 2:exe + QLibrary("Mainwindow.dll"), call MainWindow as a dynamic library, when i colse ,it says nothing. every goes OK.
    even I added QComboBox to the Ui.

    I donot use any qthread, or qtimer. only a new mainwindow skeleton project from widzard.
    Anyone has this problem ,and how does it happen?
    thanks.

    JKSHJ 1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      that doesn't seem right. You should be able to instantiate a Qtimer or similar in any class derived from QObject.

      The dystopian literature that served as a warning in my youth has become an instruction manual in my elder years.

      Q 1 Reply Last reply
      0
      • Kent-DorfmanK Kent-Dorfman

        that doesn't seem right. You should be able to instantiate a Qtimer or similar in any class derived from QObject.

        Q Offline
        Q Offline
        QtTester
        wrote on last edited by
        #3

        @Kent-Dorfman
        I do think it's a qt bug. When i load other UI with QtPlugLoader just inherited from QWidget, the warning will not appear.

        1 Reply Last reply
        0
        • Q QtTester

          Hi,all:
          I have encountered an interesting problem.

          Qt5.14.1 + VS2017 32bit + Win 10

          I have a exe project and an MainWindow project. exe to show MainWindow.

          Scene 1: exe + QPluginLoader(MainWindow), call MainWindow as a qt plugin, when i close ,it says:

          QBasicTimer::start: QBasicTimer can only be used with threads started with QThread
          

          especially when you drag a QComboBox to the ui.
          without QComboBox, it says nothing.

          Scene 2:exe + QLibrary("Mainwindow.dll"), call MainWindow as a dynamic library, when i colse ,it says nothing. every goes OK.
          even I added QComboBox to the Ui.

          I donot use any qthread, or qtimer. only a new mainwindow skeleton project from widzard.
          Anyone has this problem ,and how does it happen?
          thanks.

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by JKSH
          #4

          @QtTester Before you quit your application:

          1. Make sure that your MainWindow is closed and deleted
          2. Call QPluginLoader::unload()

          Does the warning message still appear?

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • D Offline
            D Offline
            Daniel X
            wrote on last edited by
            #5

            Just chiming in for search engine posterity, in case this helps anyone: I was getting this error because I was inadvertently delete-ing a QComboBox after my QApplication instance had already been destroyed.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved