Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Thread interruption from QML

Thread interruption from QML

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 256 Views
  • 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.
  • U Offline
    U Offline
    UbiMiles
    wrote on last edited by
    #1

    how can I request Thread interruption from the QML side to a QThread running
    quit() does not work for me
    terminate() destroys the thread right away which causes some errors in an API I'm using to control some hardware in the thread
    I want to properly close and destroy the device I'm using onInterruptionRequested and then kill the thread
    I want to do so from the QML side, what options do I have ?
    b27b6fb1-89be-45c9-9afc-e7cf9f18a0a3-image.png

    1 Reply Last reply
    0
    • U Offline
      U Offline
      UbiMiles
      wrote on last edited by
      #2

      as a workaround for now I added a slot in my thread to do that for me using C++ and called it using QML
      c333d0db-9cea-4604-8761-85b2b439f11c-image.png
      if there's a better way to do it please do tell!

      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