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. [android] QML Window.visibility property not working in Qt 5.3 (SOLVED)
QtWS25 Last Chance

[android] QML Window.visibility property not working in Qt 5.3 (SOLVED)

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 944 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.
  • L Offline
    L Offline
    lpcamargo
    wrote on last edited by
    #1

    Hello!

    I have a game written in QML that utilizes QtMultimedia's Audio object to play some background music. I want to able to determine when the user leaves the Android activity, so that I can pause the music and the game itself. As things are currently, if I go back to the homescreen the app keeps playing music and all the QML timers still run, even if I lock the device! Oddly, it seems that the activity is still trying to render to the surface, because the moment I minimize the app, EGL_BAD_SURFACE errors abound the Application Output pane in QtCreator.

    I was trying to use the Window.visibility property to determine if the app is being displayed currently but this fails, it never changes to Hidden or Minimized. Is there is any other way to detect if the application is not on screen on Android?

    Thanks in advance

    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