Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    QtScript and modal widgets

    General and Desktop
    2
    4
    1048
    Loading More Posts
    • 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
      kmedghaith last edited by

      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 Reply Quote 0
      • M
        mcosta last edited by

        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 Reply Quote 0
        • K
          kmedghaith last edited by

          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 Reply Quote 0
          • M
            mcosta last edited by

            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 Reply Quote 0
            • First post
              Last post