Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Android app seems like exits on Back Button (in main activity)

Android app seems like exits on Back Button (in main activity)

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 1 Posters 1.7k 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.
  • Z Offline
    Z Offline
    zword
    wrote on 30 Jan 2015, 17:22 last edited by
    #1

    Hello!

    I have one activity: @class MyActivity: extends Activity@

    When i launch my app through application launcher and then press back button something strange occures.
    Namely, my cpp class destructor is called:

    main.cpp:
    @QQuickView view;
    myClass *myClassObj = new myClass (&view);
    @

    myClass.h

    @explicit myClass (QObject *parent = 0): QObject(parent) { qDebug("myClass Ctor"); }@

    as i don't implicitly delete myClassObj seems like view is destroyed, but (the strange thing) MyActivity's onDestroy() is not called. So it seems like app exits but not completly;)

    But! But when i hold and press Home button to get list of running apps i see my app, but when i click on it it opens like a new instance (my changings are lost in this "instance").

    I'm using Qt5.3.1 and Qt5.4.0.

    Help me, i'm stuck.

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      zword
      wrote on 30 Jan 2015, 20:30 last edited by
      #2

      As i see all qt apps running on android can't properly handle Back Button from main activity.

      What happens with your qt android apps when they starts from application launcher and then you press Back Button?

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zword
        wrote on 30 Jan 2015, 21:03 last edited by
        #3

        Seems like i found the "solution":https://bugreports.qt.io/browse/QTBUG-29063

        1 Reply Last reply
        0

        2/3

        30 Jan 2015, 20:30

        • Login

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