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. QtPurchasing and Product.resetStatus()
Qt 6.11 is out! See what's new in the release blog

QtPurchasing and Product.resetStatus()

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 646 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    Sorneone
    wrote on last edited by
    #1

    Hi, I am trying to re-fetch in-app products and found a method resetStatus in Product type. But I am getting runtime error when I am calling product.resetStatus() :

    qrc:///main.qml:2074: TypeError: Property 'resetStatus' of object QQuickItem_QML_62(0x228a639e410) is not a function

    product.purchase() and everything else works fine.

    Documentation states: This method was introduced in QtPurchasing 1.0.2.
    How to enable this method in my project?

    PS. I tried Qt 5.11.1 and Qt 5.10.1 with no luck.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Not a direct answer as I haven't used that module but from your description, wouldn't the Store.restorePurchases method be what you are looking for ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sorneone
        wrote on last edited by
        #3

        No, sorry, restorePurchases is useful too, but I need to re-fetch products, which were not fetched because of no internet connection or connection timeouts when app started.

        I see this method in \qml\QtPurchasing\plugins.qmltypes but when I am downloaded QtPurchasing source code, resetStatus is only declared in qinappproductqmltype_p.h

        I guess it is private header. But documentation states it is ok to use resetStatus:

        https://doc.qt.io/qt-5.11/qml-qtpurchasing-product.html

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Can you show the code you are using that is failing ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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