Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. I am try to develop app for android to generate the random number.
QtWS25 Last Chance

I am try to develop app for android to generate the random number.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
androidqt creator
2 Posts 2 Posters 342 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.
  • D Offline
    D Offline
    dev_liya
    wrote on 2 Feb 2022, 11:19 last edited by dev_liya 2 Feb 2022, 11:32
    #1

    I have write this below code for generate the random number from 0 to 1 and 1 to 100.
    i have used two kits.

    1. Android Qt 5.15.2 Clang Multi-Abi
    2. Desktop Qt 5.15.2 MSVC2019 32bit

    Here I have share the link of code and video.

    Here is the link of code and demo video.

    my issue is this app is working fine on the desktop. when I clicked on one button then one thread has start and other is stop. and vice-versa for second button. but when run in android then if we clicked one button then one thread has start and when we clicked second button the both thread run parallelly no one has been stop. i have upload the demo video and code into the above drive link.

    please anyone help me i am stuck with this issue. i have not any idea about this issue. i cannot understand what is the issue. please help me.

    J 1 Reply Last reply 2 Feb 2022, 11:42
    0
    • D dev_liya
      2 Feb 2022, 11:19

      I have write this below code for generate the random number from 0 to 1 and 1 to 100.
      i have used two kits.

      1. Android Qt 5.15.2 Clang Multi-Abi
      2. Desktop Qt 5.15.2 MSVC2019 32bit

      Here I have share the link of code and video.

      Here is the link of code and demo video.

      my issue is this app is working fine on the desktop. when I clicked on one button then one thread has start and other is stop. and vice-versa for second button. but when run in android then if we clicked one button then one thread has start and when we clicked second button the both thread run parallelly no one has been stop. i have upload the demo video and code into the above drive link.

      please anyone help me i am stuck with this issue. i have not any idea about this issue. i cannot understand what is the issue. please help me.

      J Online
      J Online
      jsulm
      Lifetime Qt Champion
      wrote on 2 Feb 2022, 11:42 last edited by jsulm 2 Feb 2022, 11:43
      #2

      @dev_liya Why do you need threads to generate random numbers?!
      You can do this way easier using QTimer...

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2

      1/2

      2 Feb 2022, 11:19

      • Login

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