Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-16854

Conditional Imports

    XMLWordPrintable

    Details

      Description

      There are times when you would like to use a module (service) that may or may not be available. For examples sensors. In a game sensors may provide additional control methods that are optional, and on a desktop or platform without sensors it would nice if it failed silently. Right now it's possible using a loader, but it's awkward and makes for poor example applications.

      [13:26] <asj> in QML can you have a conditional import? basically like "if import QtMobility.sensors fails, well don't worry be happy"
      [13:33] <blam> asj: I don't think so.. although it would be really good to have. One (awkward) way to check is to load the code that uses it using a Loader and then check Loader::status
      [13:33] <blam> asj: could you file a suggestion for that please?

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              qtqmlteam Qt Qml Team User
              Reporter:
              stanleyj Andrew Stanley-Jones (closed Nokia identity) (Inactive)
              Votes:
              23 Vote for this issue
              Watchers:
              23 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes