Import error: Silica Backgrounds 1.0

I wanted to play around with Silica Background materials; glass, etc…The documentation says to use the following import statement;

import Sailfish.Silica.Background 1.0

This causes an error, stating;

QML module does not contain information about components contained in modules

What am I missing?

I note that this is under development, so perhaps it just is not included in the latest SDK for now…?

This should be just an error with coding assistance under the IDE - unfortunately the Silica module in recent releases does not provide a complete type information to the IDE. You should still be able to use the module; just the coding assistance will not be available (IDE will keep complaining).


Thanks for replying @martyone, much appreciated.

Not long after posting my question, I noticed what you have said above, the import statement remains underlined but modules can be used, but this was only apparent after several restarts of QtCreator.

A full of example of usage would be good, including info about Singleton pragma (this is new to me). How do I make a singleton?, is this just a plain QML file?, does it need to be a separate file?, I’m a bit lost but keen to learn!

This would be better answered under a separate topic :wink:

1 Like