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.
Forum Updated to NodeBB v4.3 + New Features

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 349 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 last edited by dev_liya
    #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.

    jsulmJ 1 Reply Last reply
    0
    • D dev_liya

      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.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #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

      • Login

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