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. Error because of thread ..

Error because of thread ..

Scheduled Pinned Locked Moved General and Desktop
6 Posts 5 Posters 2.2k Views 1 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.
  • B Offline
    B Offline
    BibekKumar
    wrote on last edited by
    #1

    I am using the QLineedit in my application (lineedit->setEnabled(false)).. but when in my application that QLineedit is accessed , it shows its being used by some other thread , where as the current thread is something different ..

    The error displays in a dialog box having 3 button (abort, retry, ignore )when i am debugging with the following text .

    **ASSERT failure in QCoreApplication::sendevent:"cannot send events to objects owned by a different thread . Current thread 1c24db20 .Receiver 'Lineedit'(oftype 'QLineedit') was created in thread 90c2a18",file kernel\qcoreapplication.cpp,line330 **

    can anyone help for resolving this issue ??

    Thankx in adv .

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      This can't be solved by this little information.
      Typically this happens when you have multiple threads in the game.

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • B Offline
        B Offline
        BibekKumar
        wrote on last edited by
        #3

        so what information you need ?

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lgeyer
          wrote on last edited by
          #4

          Make sure you don't access any GUI elements from any other thread than the GUI thread (main thread); you are not allowed to do that. If you need to manipulate GUI elements from secondary threads you will have to use (asynchronous) signals and slots (as well for QLineEdit::setEnabled()).

          1 Reply Last reply
          0
          • R Offline
            R Offline
            raaghuu
            wrote on last edited by
            #5

            Are you using threads in your app?

            1 Reply Last reply
            0
            • F Offline
              F Offline
              franku
              wrote on last edited by
              #6

              "you will have to use (asynchronous) signals and slots"

              --> Use Qt::QueuedConnection as the Qt::ConnectionType parameter of QObject::connect(...) parameter, to detach the threads.

              This, Jen, is the internet.

              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