Re: [SailfishDevel] setContextProperty

2015-09-16 Thread tw_bolek

> Hello,
> 
> https://lists.sailfishos.org/pipermail/devel/2013-December/001717.html

Works like a charm, THANK YOU!!
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Can't use QDeviceInfo

2015-09-16 Thread tw_bolek

> > >add sailfishapp also to the PKGCONFIG
 
Before you answered, I tried removing CONFIG += link_pkgconfig  and only kept 
PKGCONFIG += Qt5SystemInfo and it builds and works just fine!

Thank you guys!

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


[SailfishDevel] setContextProperty

2015-09-16 Thread tw_bolek
Please excuse me guys for being such a newbie. Coming from BB10 where many 
details are different, I have a lot of problems with even the most basic stuff 
on Sailfish :(

I have a Q_INVOKABLE - let's say something like:

QInt DoSomeMath() {

// does some calulation

return result;

}

and I need to call it from QML, e.g. like this:

myQmlProperty = _myapp.DoSomeMath()

I've got everything working, except for how (and where) to setContextProperty 
(_myapp) so that I can call it from QML...

Can you please help?  That's ALL left to make my project complete.

Once again, thank you very much!
Bolek
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


[SailfishDevel] Can't use QDeviceInfo

2015-09-16 Thread tw_bolek
> do you have such in your .pro
> CONFIG += link_pkgconfig
> PKGCONFIG += Qt5SystemInfo

Just added:

CONFIG += sailfishapp \
   link_pkgconfig
PKGCONFIG += Qt5SystemInfo

Now I get:

undefined reference to `SailfishApp::main(int&, char**)'

___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


[SailfishDevel] Can't use QDeviceInfo

2015-09-16 Thread tw_bolek
Guys, PLEASE, help me, or soon I'll go nuts.

For days I've been struggling to use QtSystemInfo/QDeviceInfo to get IMEI. I 
need to do it in C++, not in QML.

It is properly imported (e.g. #include ), QtCreator 
recognizes it, but every time I try to build the project I end up with 
"undefined reference to `QDeviceInfo::QDeviceInfo(QObject*)'" error.  I tried 
literally everything - no way to make the damn thing work!  

deviceInfo = new QDeviceInfo;   
always causes undefined reference to `QDeviceInfo::QDeviceInfo(QObject*)'

I'm totally fooled now. Can someone please just post an example code to make it 
work? Just what to add to the default main.cpp file

Thank you very much in advance!
Bolek
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-24 Thread tw_bolek


Thomas Perl  wrote:

> Why do you want to use Qt Resources instead of deploying the files to 
> the filesystem?

To hide SOME code from those who like to just copy&paste rather than ask for 
permission or credit the source. Not from everyone, just from those 
"copy&pasters". Some time ago I had my entire QML application copied this way 
and released in Nokia store with just some minor things changed, and since then 
I've been using resources.

I know that it's a poor protection as it is just compression so it can be 
easily decompressed and extracted, but I guess it is enough for those who copy 
stuff like this, as it's usually people who can't code too much themselves (or 
else they wouldn't need to copy simple stuff), so it is doubtful that they'd 
know how to decompress and extract from the binary.  And even if they know, at 
least it takes some more effort than Ctrl+C / Ctrl+V - I mean if they don't 
bother to contact the author and ask, at least they'll need to spend time on 
extracting it from resource, which for me is a sufficient trade off ;-) 

I know that better protection solutions exist, but I do not have time (nor 
actually the need) to use them

And, like you mentioned, I'm not sure if I'd like the idea of people being able 
to modify the app on the fly while it still shows my name as an author...

B.
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-24 Thread tw_bolek

Thomas Perl  wrote:

> Why do you want to use Qt Resources instead of deploying the files to 
> the filesystem?

To "hide" some of QML code away from prying eyes.  Of course, I know that it's 
a very poor protection as it is just compression so everything can be easily 
extracted, but that's actually all I need.  I do not intend to protect the code 
from anyone, just from those "copy&pasters" who take whole portions of other 
people's projects (or even whole applications) and use as their own without 
crediting the source or contacting the author and just asking.  Some time ago I 
had my entire QML app copied this way and released in Nokia store (with just 
some colors changed) and since then I use resources.   People who copy others' 
work this way usually can't code too much themselves (and that's why they copy) 
so they usually don't know how to extract from the resource, either.   And even 
if they know, at least it takes some effort (surely more than just copying a 
.qml file) - I mean if they don't have time to contact the author and just ask 
for permission then at least they'll spend that t
 ime on extracting and decompressing from the resource :-)   That's my goal - 
to force such people to make some more effort than Ctrl+C / Ctrl+V ;-)  It 
enhances their skills, so it's quite an educational attempt - maybe one day 
they'll start writing apps themselves.

That's why I use Qt resource rather than some more sophisticated protection - 
for the type of persons I want to protect it against it is quite sufficient,  
and from other types of people I do not need to protect it, nor do I have time 
to do it.

B.
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] rcc -threshold option doesn't work?

2014-04-24 Thread tw_bolek
> I believe the problem may be that the Makefile is recreated every time 
> you press build because of limitations in the qt creator / virtual 
> machine integration. You could try adding QMAKE_RESOURCE_FLAGS to your 
> "spec" file in a suitable place.
> 
> QMAKE_RESOURCE_FLAGS += -threshold 0 -compress 9

Hi Juha, thank you for your reply. Makefile is no longer recreated after I 
disabled "Always build before deploying" in QtCreator's settings. I have other 
manual modifications in Makefile (e.g. install_qml commented out to prevent the 
inclusion of qml folder in rpm) and they all remain intact (and affect the 
build) and so the threshold option also stays there, just doesn't seem to have 
any effect whatsoever.

I will try your .spec file modification then

BR,
Bolek
___
SailfishOS.org Devel mailing list


[SailfishDevel] Is support for commercial apps a TABOO subject?

2014-04-24 Thread tw_bolek
On April 4 Duncan Waugh wrote:

" [...] support commercial applications. Is there any news on when this is 
planned for integration?"

No answer.

On April 17 Marcin M. wrote:

"Is there any estimated time when paid apps will be allowed to Harbour?"

No answer.

There are also a number of such topics on together.jolla com (and some of them 
very popular, within the top 30-40 most voted for topics) requesting any 
information about plans to introduce support for paid applications in the Jolla 
store.

None of them ever replied or commented on by anyone from Jolla.


So my question is: is this some kind of taboo subject, or something of as 
little importance that for over 4 months now no Jollan has said A WORD about it 
despite numerous requests?

A couple of my friends already gave up after waiting so long for even just any 
information, and I must say that I'm slowly losing hope, too.  We all 
understand and are aware of the enormous job Jolla has been doing, so we're 
asking for just INFORMATION about the progress, even just if AT ALL there are 
any plans to do it in a foreseeable future, and if so then knowing even just as 
little as if it will take a month or half a year would be all we need...

Bolek
___
SailfishOS.org Devel mailing list


[SailfishDevel] rcc -threshold option doesn't work?

2014-04-23 Thread tw_bolek
Hello guys,

Has anyone managed to get the -threshold option of rcc (resource compiler) to 
work?   By default the threshold is quite high and leaves many files 
uncompressed in the resource, so I usually change it to much lower threshold.  
It used to work fine on Symbian and Harmattan, it does work on BB10,  but on 
Sailfish OS adding e.g.

-threshold 2 

to rcc command in Makefile (to get threshold level of 2%) doesn't seem to have 
any result whatsoever - all the files remain uncompressed while with such a 
very low threshold everything should be compressed...  Also tried other values, 
e.g. 10, to no avail. 

Thanks,
Bolek
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread tw_bolek
> I usually do this by renaming the qml folder, create a new qml folder,
> and create en empty qml file in the folder (otherwise the deploy fails).
> 
> This changes the path to files included in the resource, so they have to
> be added again.


Good idea...

Anyway, let's hope that this gets corrected soon so that including the qml 
folder isn't forced and can be disabled in a simple way, e.g. by an option in 
.pro file...

B.
___
SailfishOS.org Devel mailing list



Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread tw_bolek
I've just managed to build rpm without the freakin' qml folder,  but in order 
to do that I additionally needed:

- manually edit Makefile and remove qml_install and qml_uninstall
- in .specs file remove   /usr/share/myappand  %{_datadir}/%{name}/qml   
lines

Don't mean to be rude or something, but it is seriously SICK to have to do such 
things to exclude a folder that is in a resource and thus it is no longer 
needed.   In Qt4.8 all I needed to do was to comment out one line 
(DEPLOYMENTFOLDER) in .pro file,  and on BB10  I just need to exclude asset in 
bar-descriptor.xml.

Bolek






W dniu 2014-04-23 21:18:04 użytkownik Andrey Kozhevnikov 
 napisał:
> did you made "clean" and removed build folder content?
> 
> 24.04.2014 01:16, tw_bolek пишет:
> >
> > Doesn't work, either :((  The qml folder is still added to rpm.
> > And while building the rpm  I get messages about "overriding commands for 
> > target 'install_desktop'", "ignoring old commands for target 
> > 'install_icon'", etc.
> >
> >
> >
> >
> >> okay, then try this:
> >> desktop.files = $${TARGET}.desktop
> >> desktop.path = /usr/share/applications
> >> icon.files = $${TARGET}.png
> >> icon.path = /usr/share/icons/hicolor/86x86/apps
> >> INSTALLS = desktop icon
> >
> >
> >
> >
> >
> > W dniu 2014-04-23 20:39:30 użytkownik tw_bolek  napisał:
> >> Doesn't work :(
> >>
> >> INSTALLS -= qml  doesn't seem to do anything, and renaming the qml folder 
> >> results in an RPM build error - files not found
> >>
> >> Anything else, please?
> >>
> >> Gosh, it was so easy and obvious in Qt4.8
> >>
> >> Thank you,
> >> Bolek
> >>
> >>
> >>> you can try to add INSTALLS -= qml somewhere after
> >>> sailfishapp config line, or just rename folder name
> >>
> >>
> >>>> Now, *PLEASE*, one more help request:
> >>>>
> >>>> what is the best way to EXCLUDE the qml folder from
> >>>> being added to the rpm file?
> >> ___
> >> SailfishOS.org Devel mailing list
> >>
> >
> >
> > ___
> > SailfishOS.org Devel mailing list
> 
> ___
> SailfishOS.org Devel mailing list



___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread tw_bolek
Yes, I did "clean", deleted the whole build folder, then did "clean" again.  
That FREAKING folder still gets added



> did you made "clean" and removed build folder content?
> 
> 24.04.2014 01:16, tw_bolek пишет:
> >
> > Doesn't work, either :((  The qml folder is still added to rpm.
> > And while building the rpm  I get messages about "overriding commands for 
> > target 'install_desktop'", "ignoring old commands for target 
> > 'install_icon'", etc.
> >
> >
> >
> >
> >> okay, then try this:
> >> desktop.files = $${TARGET}.desktop
> >> desktop.path = /usr/share/applications
> >> icon.files = $${TARGET}.png
> >> icon.path = /usr/share/icons/hicolor/86x86/apps
> >> INSTALLS = desktop icon
> >
> >
> >
> >
> >
> > W dniu 2014-04-23 20:39:30 użytkownik tw_bolek  napisał:
> >> Doesn't work :(
> >>
> >> INSTALLS -= qml  doesn't seem to do anything, and renaming the qml folder 
> >> results in an RPM build error - files not found
> >>
> >> Anything else, please?
> >>
> >> Gosh, it was so easy and obvious in Qt4.8
> >>
> >> Thank you,
> >> Bolek
> >>
> >>
> >>> you can try to add INSTALLS -= qml somewhere after
> >>> sailfishapp config line, or just rename folder name
> >>
> >>
> >>>> Now, *PLEASE*, one more help request:
> >>>>
> >>>> what is the best way to EXCLUDE the qml folder from
> >>>> being added to the rpm file?
> >> ___
> >> SailfishOS.org Devel mailing list
> >>
> >
> >
> > ___
> > SailfishOS.org Devel mailing list
> 
> ___
> SailfishOS.org Devel mailing list



___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread tw_bolek


Doesn't work, either :((  The qml folder is still added to rpm.
And while building the rpm  I get messages about "overriding commands for 
target 'install_desktop'", "ignoring old commands for target 'install_icon'", 
etc.  




> okay, then try this:

> desktop.files = $${TARGET}.desktop
> desktop.path = /usr/share/applications

> icon.files = $${TARGET}.png
> icon.path = /usr/share/icons/hicolor/86x86/apps

> INSTALLS = desktop icon






W dniu 2014-04-23 20:39:30 użytkownik tw_bolek  napisał:
> Doesn't work :(
> 
> INSTALLS -= qml  doesn't seem to do anything, and renaming the qml folder 
> results in an RPM build error - files not found
> 
> Anything else, please?
> 
> Gosh, it was so easy and obvious in Qt4.8
> 
> Thank you,
> Bolek
> 
> 
> > you can try to add INSTALLS -= qml somewhere after 
> > sailfishapp config line, or just rename folder name
> 
> 
> 
> >> Now, *PLEASE*, one more help request: 
> >> 
> >> what is the best way to EXCLUDE the qml folder from 
> >> being added to the rpm file?
> 
> ___
> SailfishOS.org Devel mailing list
> 



___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread tw_bolek

> show your full pro file

Hey Andrey, here you are. Nothing special in there.



# The name of your app.
# NOTICE: name defined in TARGET has a corresponding QML filename.
# If name defined in TARGET is changed, following needs to be
# done to match new name:
# - corresponding QML filename must be changed
# - desktop icon filename must be changed
# - desktop filename must be changed
# - icon definition filename in desktop file must be changed
TARGET = myapp

CONFIG += sailfishapp

INSTALLS -= qml

SOURCES += src/myapp.cpp

OTHER_FILES += rpm/myapp.yaml \
myapp.desktop

RESOURCES += \
myapp.qrc







> Doesn't work :(
> 
> INSTALLS -= qml  doesn't seem to do anything, and renaming the qml folder 
> results in an RPM build error - files not found
> 
> Anything else, please?
> 
> Gosh, it was so easy and obvious in Qt4.8
> 
> Thank you,
> Bolek
> 
> 
> > you can try to add INSTALLS -= qml somewhere after 
> > sailfishapp config line, or just rename folder name
> 
> 
> 
> >> Now, *PLEASE*, one more help request: 
> >> 
> >> what is the best way to EXCLUDE the qml folder from 
> >> being added to the rpm file?
> 
> ___
> SailfishOS.org Devel mailing list
> 



___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread tw_bolek
Doesn't work :(

INSTALLS -= qml  doesn't seem to do anything, and renaming the qml folder 
results in an RPM build error - files not found

Anything else, please?

Gosh, it was so easy and obvious in Qt4.8

Thank you,
Bolek


> you can try to add INSTALLS -= qml somewhere after 
> sailfishapp config line, or just rename folder name



>> Now, *PLEASE*, one more help request: 
>> 
>> what is the best way to EXCLUDE the qml folder from 
>> being added to the rpm file?

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread tw_bolek

Thank you!!! Yes, QUrl("qrc:/myapp/main.qml") does the job!!


Now, *PLEASE*, one more help request: 

what is the best way to EXCLUDE the qml folder from being added to the rpm file?


Thank you,
B.



> I don't think you should use SailfishApp::pathTo since it points 
>to a file in data directory (see sailfishapp.h for some documentation). 
>Can you get on with using QUrl("qrc:/main.qml") ? 





> On Wednesday 23 of April 2014 09:23:29 tw_bolek wrote:
> > Hi guys,
> > 
> > I've put all my qml files into a resource file and I did NOT include the 
> > qml folder in the rpm.
> > 
> > PROBLEM: what path should I use in the main.cpp file to point to the main 
> > qml file in the resource?
> > 
> > SailfishApp::pathTo("qml/main.qml") returns /usr/share/myapp/qml/main.qml  
> > - not found
> > 
> > SailfishApp::pathTo("qrc:/qml/main.qml") returns 
> > /usr/share/myapp/qrc/qml/main.qml  - not found
> > 
> > SailfishApp::pathTo("qrc:///qml/main.qml") returns 
> > /usr/share/myapp/qrc:/qml/main.qml  - not found
> > 
> > and so on.
> > 
> > 
> > So it stubbornly tries to locate it in the (missing) qml folder, not in the 
> > resource.
> > 
> > I'm out of ideas.
> > 
> > RESOURCES += \
> > myapp.qrc
> > 
> > is included in the .pro file  and all files are in it.
> > 
> > 
> > Am I missing something else?
> > 
> > Please help!
> > 
> > Bolek
> > 
> > ___
> > SailfishOS.org Devel mailing list
> 
> I don't think you should use SailfishApp::pathTo since it points to a file in 
> data directory (see sailfishapp.h for some documentation). 
> Can you get on with using QUrl("qrc:/main.qml") ? 
> 
> B
> 
> ___
> SailfishOS.org Devel mailing list
> 



___
SailfishOS.org Devel mailing list


[SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread tw_bolek
Hi guys,

I've put all my qml files into a resource file and I did NOT include the qml 
folder in the rpm.

PROBLEM: what path should I use in the main.cpp file to point to the main qml 
file in the resource?

SailfishApp::pathTo("qml/main.qml") returns /usr/share/myapp/qml/main.qml  - 
not found

SailfishApp::pathTo("qrc:/qml/main.qml") returns 
/usr/share/myapp/qrc/qml/main.qml  - not found

SailfishApp::pathTo("qrc:///qml/main.qml") returns 
/usr/share/myapp/qrc:/qml/main.qml  - not found

and so on.


So it stubbornly tries to locate it in the (missing) qml folder, not in the 
resource.

I'm out of ideas.

RESOURCES += \
myapp.qrc

is included in the .pro file  and all files are in it.


Am I missing something else?

Please help!

Bolek

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] No map overlay objects shown if zoomLevel < 3

2013-11-25 Thread tw_bolek
Hi Aaron,

> You are not doing anything wrong. As you discovered items are only visible 
> when the map zoom level is greater than 3. Between zoom levels 2 and 3 the 
> opacity is ramped down linearly and is 0 below a zoom level of 2. See 
> https://bugreports.qt-project.org/browse/QTBUG-25393 for details on why this 
> was implemented.


Thank you very much. But does it mean that I cannot show any objects in 
zoomLevel 1?  Are there no workarounds for this?   Let's say that I need to 
show a full cruise of a ship between two distant continents - I want to show it 
over the whole world map visible at once, i.e. zoom level 1, so that the user 
does not have to scroll the map all around to see the whole route...  Zoom 
level 3 where the items become visible is of no use - it only fits a very small 
part of the what I need to show at once...Everything worked so well in 
Qt4.8/QtMobility.location 1.2

Many thanks, bolek
___
SailfishOS.org Devel mailing list


[SailfishDevel] No map overlay objects shown if zoomLevel < 3

2013-11-25 Thread tw_bolek
Hi guys,

In my application I use a map (QtLocation 5.0, Map, OSM or Nokia plugin) and I 
need to show certain overlay objects on it.  The map itself works fine (both 
with OSM and Nokia plugin), the problem is that objects over it are shown only 
if zoomLevel is 3 or more.  No matter if I use an Image within MapQuickItem, or 
MapCircle, or whatever else, the objects become visible only if the zoomLevel 
is at least 3.  On zoomLevel 0-2 only plain map is shown, no objects at all...

I use the MapQuickItem image without rescalling (i.e. its size is the same in 
all zoomLevels), I also tried with really huge MapCircle (like 500 km radius), 
so it's not that in zoomLevel 0-2 the objects are too small to be seen, they 
just AREN'T THERE.

A bug, a feature, or am I doing something wrong?

Thanks, Bolek
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] (QtLocation 5.0) Coordinate is not a type

2013-11-20 Thread tw_bolek
> @Bolek, have you got it working?

Yes, it does work this way. Thank you *VERY MUCH* Chris for your help!   For my 
needs now it's even better than previously as on Harmattan I then had to use 
Qt.createQmlObject for what I needed to get.

Thanks a lot!

BTW. Do you perhaps now the URL of the site where one can register to get the 
API key to use Nokia Maps plugin?  If I try to use it without any key it says 
to go to https://api.developer.nokia.com but that URL just redirects to the 
main Nokia Developer page.  I can't find the right place to register...   

___
SailfishOS.org Devel mailing list


[SailfishDevel] (QtLocation 5.0) Coordinate is not a type

2013-11-20 Thread tw_bolek
Hi Aaron,

> The Qt Location and Qt Positioning packages are reported
> as version 5.1.0 but they include something very close 
> to what will be in 5.2 upstream. There was no Qt Positioning
> library prior to Qt 5.2.

I have all the packages you listed installed (5.1.0 versions). I can 
successfully import QtPositioning 5.0, I can use any other element of it (e.g. 
PositionSource) and I can build and run code with those other elements without 
any problems, so this confirms that QtPositioning is installed and imported 
correctly. 

The *ONLY* thing that doesn't work is that damned Coordinate element - not 
recognized by QtCreator and throwing an error message "Coordinate is not a 
type" at run time.

I've checked 
\mersdk\targets\SailfishOS-i486-x86\usr\lib\qt5\qml\QtPositioning\plugins.qmltypes
 (and in the ARM target as well) and every other QtPositioning element is 
listed there *EXCEPT FOR* Coordinate.

So it looks that the Coordinate type simply isn't available in the package 
currently used in the Sailfish OS SDK


Michal

P.S. I am very sorry, it looks that my email client doesn't properly follow 
threads and sends each message as a new thread. I will try some other 
client today.

___
SailfishOS.org Devel mailing list


[SailfishDevel] (QtLocation 5.0) Coordinate is not a type

2013-11-19 Thread tw_bolek
P.S.  I've just tried to update with zypper, but it shows that QtPositioning 
5.1.0 is installed and it is the highest available version, no update is 
available

Does it mean that I cannot use the Coordinate element in a Sailfish OS 
application for now?

Thanks,
Bolek
___
SailfishOS.org Devel mailing list


[SailfishDevel] (QtLocation 5.0) Coordinate is not a type

2013-11-19 Thread tw_bolek
Chris,

Thank you!

What a mess...   It looks that it must have been moved from QtLocation to 
QtPositioning only recently. It seems to be only in QtPositioning 5.2.
That's why it wasn't recognized despite importing both QtLocation 5.0 and 
QtPositioning 5.0

Where and how can I install QtPositioning 5.2 from?  The one I have installed 
is 5.0.   Trying to import QtPositioning 5.2 returns: "QtPositioning" 
version 5.2 is not installed "...

Thanks,
Bolek
___
SailfishOS.org Devel mailing list


[SailfishDevel] (QtLocation 5.0) Coordinate is not a type

2013-11-19 Thread tw_bolek
Dear all,

Before I spend another couple of days on trying to solve this, maybe you can 
help

I'm working on a mappining application.  I imported QtLocation 5.0 (had to also 
install the missing module - installed qt5-qtlocation and 
qt5-qtdeclarative-import-location) and everything works fine and every other 
type is correctly recognized and used (Map, MapQuickItem, etc.)   but there's 
one element that is not recognized:

Coordinate

I can't get it working no matter what.  QtCreator underlines it in red (and 
shows a message Unknown component) and when I build the project and launch it 
in the Emulator I get error message "Coordinate is not a type".

According to Qt5 / QtLocation 5.0 documentation I was able to find, Coordinate 
is a standard element of QtLocation 5.0 so it should be recognized if every 
other QtLocation 5.0 element is (which means that the module is correctly 
installed and imported)...

http://qt.developpez.com/doc/5.0-snapshot/qml-qtlocation5-coordinate/

Has something changed recently and Coordinate is no longer a supported element 
in QtLocation? Do I need to import some other module?


By the way, if I want to use qt5-plugin-geoservices-nokia,  where do I register 
for the API key?  https://api.developer.nokia.com just redirects to the main 
Nokia Developer page now...


Many thanks,
Bolek
___
SailfishOS.org Devel mailing list


[SailfishDevel] Problems with the Emulator (possible bugs?)

2013-11-04 Thread tw_bolek
Hello guys,

While porting my applications to Sailfish OS, I encountered the following 
problems with the Emulator. I tried it numerous times and I always end up with 
the same result:

1) I cannot make onDoubleClick signal work.  I have a Rectangle with a 
MouseArea filling it, and it has an onDoubleClicked signal - there's no 
reaction to it (tried clicking with various delays, a lot of times very 
quickly, etc.).  If I change it to onClicked then single click works fine. I've 
also tested it with a simple Button - similarly, onDoubleClicked has no 
reaction (other than that the button gets highlighted for a short while as with 
onClicked, but nothing else happens), while with onClicked the button works OK 
with a single click.  


2) If I update something on a page that's currently not visible (i.e. it isn't 
the topmost page in the stack) then its visible contents don't get refreshed.  
Its properties themselves DO get updated (which I can verify with console.log 
output) but when I go back to that page (e.g. via pageStack.pop()) then it 
still shows "old" content. If I update these properties once again, while the 
page IS visible (topmost), then everything gets updated correctly.

For example, I have a Text element on a page (and its text is e.g. "First"). I 
then switch (via pageStack.push()) to another page and from there I update the 
first page's (not currently visible) text property (to e.g. "Second"). 
Console.log output shows that the text property gets updated, but if I switch 
back to that page then it still shows the old "First" text (despite the 
property itself now being "Second").   The very same code works properly on 
Harmattan, Symbian and BB10.  The only difference is that on Sailfish OS the 
element is within a SilicaFlickable.

Can someone please check it? I've spent the last two days trying to make the 
above work, to no avail...

Thank you,
Bolek
___
SailfishOS.org Devel mailing list


[SailfishDevel] How to get GPS Location in QML (after installing QtPositioning packages to targets and emulator)

2013-10-30 Thread tw_bolek
Success, at last.   Installing qtpositioning packages to both targets (using 
SDK Control Center), to the SDK (using zypper) and to the emulator (using 
zypper) finally did the job. It finally works and application can be deployed 
to the emulator "by copying binaries" and without any modifications.

The only question remaining is:  if I deploy to an .rpm package rather than 
directly to the emulator, how can I then install the rpm file to the emulator?

Once again, many thanks Chris for your help.

Bolek
___
SailfishOS.org Devel mailing list


[SailfishDevel] How to get GPS Location in QML (after installing QtPositioning packages to targets and emulator)

2013-10-29 Thread tw_bolek
OK, so I did the following:

- Using SDK Control Center I installed to both targets: qt5-qtpositioning, 
qt5-qtpositioning-devel, qt5-qtdeclarative-import-positioning

- using zypper I installed to the Emulator the following: qt5-qtpositioning, 
qt5-qtdeclarative-import-positioning

Did the sync, resetted QML code model in Qt Creator.  

Now Qt Creator recognizes QtPositioning 5.0 import and shows it normally (in 
black color) like other imports.  So far so good.

BUT if I deploy to the emulator "by copying binaries" I still get an error 
message about missing libQt5Location.so.5   but WHY? I did install 
qt5-qtpositioning to the emulator and to the x86 target so the library should 
be there...



OK, so I also added all those packages to the .yaml file's  PkgBR: section.
It does generate an .rpm package of my application.

Now the question is:  HOW DO I INSTALL that rpm file (my application) to the 
emulator to and how do I launch it?

Thanks,
Bolek

___
SailfishOS.org Devel mailing list


[SailfishDevel] How to get GPS Location in QML

2013-10-29 Thread tw_bolek
Chris,

First of all, thank you very much for your help.

However is there any valid reason why it is so complicated? Positioning is 
probably one of the most frequently used functions in smartphone applications. 
I'd understand that some 3rd party or less important modules are not included 
by default but Positioning...? It should be included by default

Not every developer is familiar with all these complicated procedures of 
installing additional packages. And on Windows it probably isn't as easy as on 
Linux.   I want to focus on developing apps and not on configuring the SDK to 
be able to use the most basic functions...  If I want to use something extra 
then I'm ready for it requiring additional steps, but as basic thing as 
positioning should have been included by default...

If it's due to Qt5.x not yet being complete, maybe Jolla should have sticked to 
Qt4.8 (or at least used both) until Qt5.2 comes out and matures?

Many thanks for your time and support, anyway!

Best regards,
Bolek
___
SailfishOS.org Devel mailing list


[SailfishDevel] How to get GPS Location in QML

2013-10-29 Thread tw_bolek
Hi Chris,

>> So the import we need is Import QtPositioning 5.0

Unfortunately, "QtPositioning 5.0" gives "QML module not found" and it is 
underlined in red in QtCreator...  Adding QT += positioning  to the .pro file 
does not change anything.There is no trace of "QtPositioning" in 
sailfishos/mersdk/targets/.../usr/lib/qt5,  neither for arm nor for x86 
(emulator).

Bolek
___
SailfishOS.org Devel mailing list


[SailfishDevel] How to get GPS Location in QML

2013-10-27 Thread tw_bolek
Hello list,
 
I am porting my Harmattan QML applications to Sailfish OS.  I simply need to 
get GPS Location.  In Qt4.8 / QtQuick1.1 it only took importing 
QtMobility.location and then using PositionSource. 
 
In the latest SailfishOS SDK I tried importing QtLocation 5.0 but it is not 
found.  PositionSource is an unknown element.
 
So how do I do in Sailfish OS (in QML only) as simple thing as getting 
location coordinates from GPS?
 
I'll be very grateful if you could guide me, in a simple and straightforward 
way  Thank you!
 
Bolek___
SailfishOS.org Devel mailing list