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. Trouble using AWS Javascript SDK with QML (Undefined).
Forum Updated to NodeBB v4.3 + New Features

Trouble using AWS Javascript SDK with QML (Undefined).

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 581 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.
  • J Offline
    J Offline
    James Hankins
    wrote on last edited by
    #1

    I'm attempting to utilize the AWS Javascript SDK in a Qt Quick project. Specifically the AWS Cognito User Pools.

    I'm importing the SDK like this:

    import "aws-sdk.js" as AWS
    ... //Later Calling like this
    var userPool = new AWS.AmazonCognitoIdentity.CognitoUserPool(poolData);
    

    Receiving an error:TypeError: Cannot read property 'CognitoUserPool' of undefined

    I added the aws-sdk.js by using add existing file from Qt Creator and selecting the file which is in the source directory. Is there something else I need to do to enable the use of the SDK?

    1 Reply Last reply
    0
    • fcarneyF Offline
      fcarneyF Offline
      fcarney
      wrote on last edited by
      #2

      Does that code assume it is running in a web browser? It may be expecting a DOM to be available as well as other common objects that browsers support. Are you sure that Qt JS is compatible? You may need to go through the AWS code and see if it relies on anything specific to browsers.

      C++ is a perfectly valid school of magic.

      1 Reply Last reply
      1
      • J Offline
        J Offline
        James Hankins
        wrote on last edited by James Hankins
        #3

        It’s quite possible as AWS does have two versions of the JavaScript SDK. One for browsers and 1 for NodeJS. Thanks, I will dig into this.

        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