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. QtScript and modal widgets
QtWS25 Last Chance

QtScript and modal widgets

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.2k 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.
  • K Offline
    K Offline
    kmedghaith
    wrote on last edited by
    #1

    Hi all,

    In order to automate some gui tests, I use QtScript to play some scenarios. It works globally fine but I have an issue with modal widgets where the script execution is blocked in the exec function.
    Did someone faced and resoved this issue without changing the modality of the dialogs.

    Thanks in advance.
    MG.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi,

      some months ago I started a similar task and I had the same problem.
      I found two different solutions to this problem:

      use QScriptEngine::setProcessEventsInterval

      starting script evaluation in different thread

      Try both and find what solution fits better to your case

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kmedghaith
        wrote on last edited by
        #3

        Hi mcosta,

        Thanks for the reply.
        I think that the second suggestion could lead to a crash since that the execution in a QScriptEngine is not thread safe.

        I'll try the first one.

        Thanks a lot.
        MG.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          Hi,
          [quote author="kmedghaith" date="1373360935"]I think that the second suggestion could lead to a crash since that the execution in a QScriptEngine is not thread safe.[/quote]

          If you use QScriptEngine only in one thread you don't have problem

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          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