import Sailfish.Silica.theme 1.0
On 04.01.2014 16:49, Kimmo Lindholm wrote:
I assume this is clear as daylight but I don't get it...
I need to access Theme colors from javascript --file;
I have successfully imported it
.importSailfish.Silica1.0asSilica
and in QtCreator after typing Silica. I
.import Sailfish.Silica.theme
var color_info = Theme.primaryColor
On 04.01.2014 17:14, Kimmo Lindholm wrote:
Tested, didn't work -- same results
.importSailfish.Silica.Theme1.0asSilicaTheme
var/color_info/=SilicaTheme.primaryColor;
import Sailfish.Silica.theme 1.0
On 04.01.2014 16:49,
Gives following from .import line:
[W] unknown:23 - qrc:///js/constants.js:23: SyntaxError: Unexpected token .
If I add 1.0, I get warning
[W] unknown:23 - qrc:///js/constants.js:23:1: Module import requires a qualifier
(Docs say .import TypeNamespace MajorVersion.MinorVersion as Qualifier)
.import Sailfish.Silica.theme 1.0 as SilicaTheme
function test() {
console.log(color: + SilicaTheme.Theme.primaryColor)
}
// color: #ff
On 04.01.2014 17:47, Kimmo Lindholm wrote:
Gives following from .import line:
[W] unknown:23 - qrc:///js/constants.js:23: SyntaxError: Unexpected
Ahaa... I know now where the problem is. need to read last sentence from the
documentation.
I'm doing this in stateless lib... (.pragma library) I should have mentioned
that already in first mail..
As they are shared, stateless library files cannot access QML component
instance objects or