[SailfishDevel] QtContacts available

christopher.lamb at thurweb.ch christopher.lamb at thurweb.ch
Sun Dec 22 15:54:09 UTC 2013


Hi Matthias

Here are a few more hints

You connected to the SDK with a key, but to the Emulator without. A  
key can be used for both for passwordless access.

//Connect to SDK
ssh -p 2222 -i ~/SailfishOS/vmshare/ssh/private_keys/engine/mersdk  
mersdk at localhost

ssh -p 2222 -i ~/SailfishOS/vmshare/ssh/private_keys/engine/root  
root at localhost


//Connect to Emulator
ssh -p 2223 -i  
~/SailfishOS/vmshare/ssh/private_keys/SailfishOS_Emulator/nemo  
nemo at localhost

ssh -p 2223 -i  
~/SailfishOS/vmshare/ssh/private_keys/SailfishOS_Emulator/root  
root at localhost

The commands above work on OSX, and should work on Linux.


In your mail below you used zypper to install to the SDK VM, but not  
to the build engine with the VM, so that won't really help you. You  
have made the package available to the Operating System rather than to  
the build engine.

To install "by hand" to the build-engine, either use the SDK Control  
Center to search and install the package

or

connect via SSH to the SDK as you describe, then start SB2 and use  
zypper within SB2. Then sync from the control center.


Grüsse

Chris


Zitat von "Matthias Barmeier" <barmeier at barmeier.com>:

> Hi,
>
> thanks a lot.
>
> Your link and this one:  
> http://flyingsheeponsailfish.blogspot.de/2013/10/alpha-2-migrating-landed.html
> has working hints on what packages must be installed and how to make  
> QtContacts work.
>
> If someone else needs this here is my way of QtContacts enabling:
>
> ssh to mer build engine:  ssh -p 2222 -i  
> /opt/SailfishOS/vmshare/ssh/private_keys/engine/root root at localhost
> install a package with:     zypper in qt5-qtdeclarative-pim-contacts
>
> Select the Sailfish-Icon on the QtCreator toolbar.
> Select Targets -> SailfishOS-i486-x86 -> manage -> sync
>
> On the emulator select settings and set a password for the ssh connection.
> ssh to the emulator:           ssh -p 2223 nemo at localhost <enter the  
> password>
> Install the same package: sudo pkcon install qt5-qtdeclarative-pim-contacts
>
> Restart both VMs. I don't know if this last step is neccessary, but  
> after I have done it the error message si gone
> and ContactModel is a vailid type.
>
> Thanks again !
>
>
> Ciao
>     Matze
>
> Am 21.12.2013 22:14, schrieb christopher.lamb at thurweb.ch:
>> Hi Matthias
>>
>> As the error says, QtContacts is not installed.
>>
>> Try this article on tips on how to install to the SDK and Emulator
>>
>> http://flyingsheeponsailfish.blogspot.ch/2013/11/deploying-additional-packages-to.html It focuses on Location and Positioning, but is the methods used are relevant for QtContacts as  
>> well.
>>
>> The first thing is to establish what is already installed.
>>
>> For the SDK, the easiest way for a newbie is via the SDK Control  
>> Center, which is available via the Sailfish icon on the left of the  
>> QtCreator screen.
>>
>> On the Emulator, once connected via SSH, you can search for  
>> contacts modules with
>>
>> pkcon search name contacts
>>
>> I have several contacts modules installed on my Emulator, but then  
>> I have been experimenting with contacts, and will have installed  
>> some of these myself.
>>
>> Once you have the correct modules installed to the SDK and Emulator  
>> (and synced with QtCreator), then you should be able to use  
>> QtContacts from both C++ and QML.
>>
>> Ciao
>>
>> Chris
>>
>> Zitat von "Matthias Barmeier" <barmeier at barmeier.com>:
>>
>>> Hi,
>>>
>>> the include error is fixed, but now I am back to my old problem:
>>>
>>> [W] unknown:33 -  
>>> file:///usr/share/test/qml/pages/FirstPage.qml:33:1: module  
>>> "QtContacts" is not installed
>>>
>>> import QtContacts 5.0
>>>
>>>
>>> my QML:
>>>
>>> import QtQuick 2.0
>>> import Sailfish.Silica 1.0
>>> import QtContacts 5.0
>>>
>>> Page {
>>>    id: page
>>> ...
>>>
>>>
>>> my test.cpp:
>>>
>>> #ifdef QT_QML_DEBUG
>>> #include <QtQuick>
>>> #endif
>>>
>>> #include <sailfishapp.h>
>>> #include <QtContacts/QtContacts>
>>>
>>> ...
>>>
>>> What else must I do ?
>>>
>>> Ciao
>>>    Matze
>>>
>>> Am 21.12.2013 14:36, schrieb Andrey Kozhevnikov:
>>>> add
>>>> INCLUDEPATH += /usr/include/qt5/QtContacts
>>>> to pro file
>>>>
>>>> On 21.12.2013 18:44, Matthias Barmeier wrote:
>>>>> Hi,
>>>>>
>>>>> I added the CONFIG line to my project file. And added the  
>>>>> include to my .cpp file, but got this.
>>>>>
>>>>> /usr/include/qt5/QtContacts/qcontact.h:53:  
>>>>> Fehler:qcontactsglobal.h: No such file or directory
>>>>>
>>>>> This file is availables under:
>>>>> /opt/SailfishOS/mersdk/targets/SailfishOS-i486-x86/usr/include/qt5/QtContacts I try to use QtContacts from qml ist this possible  
>>>>> ?
>>>>>
>>>>> Ciao
>>>>>   Matze
>>>>>
>>>>> Am 21.12.2013 13:04, schrieb Andrey Kozhevnikov:
>>>>>> add it to pro file CONFIG += Qt5Contacts
>>>>>> and then include in Qt <QtContacs/...>
>>>>>>
>>>>>> On 21.12.2013 18:02, Matthias Barmeier wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am new to SailfishOS coming from Harmattan. How can I add  
>>>>>>> this module ?
>>>>>>> Is there any Dev Introduction available on how to add modules  
>>>>>>> or which modules are available ?
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>> Ciao
>>>>>>>   Matze
>>>>>>>
>>>>>>> Am 21.12.2013 12:59, schrieb Andrey Kozhevnikov:
>>>>>>>> its Qt5Contacts module
>>>>>>>>
>>>>>>>> On 21.12.2013 17:58, Matthias Barmeier wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> is QtContacts available for SDK emulator or Device ? And if  
>>>>>>>>> it is available where and how can I get it ?
>>>>>>>>>
>>>>>>>>> Ciao
>>>>>>>>>    Matze
>>>>>>>>> _______________________________________________
>>>>>>>>> SailfishOS.org Devel mailing list
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> SailfishOS.org Devel mailing list
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> SailfishOS.org Devel mailing list
>>>>>>
>>>>>> _______________________________________________
>>>>>> SailfishOS.org Devel mailing list
>>>>>
>>>>> _______________________________________________
>>>>> SailfishOS.org Devel mailing list
>>>>
>>>> _______________________________________________
>>>> SailfishOS.org Devel mailing list
>>>
>>>
>>
>>
>>
>
>





More information about the Devel mailing list