Hi Kalle and Wim
The Haptics control that causes the same error as Wim reports is
standard QtMobility stuff, used as follows.
import QtMobility.feedback 1.1
HapticsEffect {id: rumbleEffect
attackIntensity: 0.0
attackTime: 250
intensity: 1.0
duration: 100
fadeTime: 250
fadeIntensity: 0.0
}
If there is anything N9 specific about it, then that must be on the
Sailfish side..
B.t.w it is possible that something quite different is causing the
same error in Wim's case.
To demonstrate my error, and the side issue of putting groups controls
into separate folders I have made a little demo project "FoldersDemo"
Attached is:
a) FoldersDemo.pro
b) FirstPage.qml
c) SecondPage.qml
d) HapticItem.qml
Setting up:
1) In QtCreator create a New Project / Sailfsih Qt Quick Application.
Call it Folders Demo.
2) Slot in files a), b) and c) in place of the original files of the
new project.
3) Create a folder "controls" in the project at the same level as
"pages" and "cover". Add file d) to this folder.
At this stage you should see the folder "controls" in QtCreator under
"QML". You may need to reopen the project for this to happen.
Recreating the Error:
The control HapticItem is included in both FirstPage and SecondPage.
You can comment in or out to turn the error on or off. Both pages open
no problem. Interestingly the error is only reported once - presumably
be the first to attempt to use the offending control.
Adding a new QML Sub Folder:
Proved to be very easy,
a) create the physical folder as indicated above
b) put a qml file in it - the folder will not display in Qt creator
unless it has content!
c) add the folder to the .pro file qml.flles entry
d) import it on the Pages / other controls that use controls within
the folder (see FirstPage.qml above). Note the import is relative to
the control you are in, so from FirstPage, i need to refer back one
level.
Grüsse
Chris
Zitat von "Kalle Jokiniemi" <kalle.jokini...@jollamobile.com>:
Hello,
On Tue, 2013-06-04 at 18:08 +0200, christopher.l...@thurweb.ch wrote:
Hi Wim
I think it may well be down to something you are doing in
GroupBox.qml. Can you post the content of this component?
I get the same error from one of my core apps when it starts up on the
Sailfish Emulator
% Display on requested
% Qml debugging is enabled. Only use this in a safe environment!
% Using the meego graphics system
% libEGL warning: DRI2: failed to authenticate
% Unable to open input file: No such file or directory
% QFeedbackFFMemless::QFeedbackFFMemless(QObject*) Error: did not find
vibra spi device!
% defaultServiceProvider::requestService(): no service found for -
"com.nokia.qt.camera"
% Camera error: "The camera service is missing"
The app actually starts up despite these errors. I suspect the "Unable
to open input file" is down to Feedback / Haptics which I have in this
project, but I have not yet got around to proving it (the "vibra spi"
line immediately after this points in that direction, and I guess it
is possible that the emulator does not (yet) properly support haptics.
Haptics support depends on if there is an force feedback input device
that supports FF_RUMBLE and FF_PERIODIC (basically a ff-memless kernel
driver) in the kernel that is being run. The "vibra spi" AFAIK is N9
specific vibra driver.
I guess in theory if you plug in a force feedback joystick with
ff-memless driver support, it might vibrate. Though not sure how the
resources are available in kernel run by a virtual machine..
- Kalle
http://freegamedev.net/wiki/Force_Feedback
On the train on the way home later this evening I will comment out the
haptics stuff and see if the error disappears.
tot zins
Chris
Zitat von "Wim de Vries" <wsvr...@xs4all.nl>:
> Even more strange
> I have added QML/pages to qml.files in .pro
> GroupBox comes up now, but the error message is still there.
>
> The loading page (SecondPage.qml) and the to-be loaded page
> (GroupBox.qml) are in the same directory.
> Why is it not found by default?
>
> r
> wim
>
>
>
> On 06/04/2013 03:48 PM, Wim de Vries wrote:
>> Additinal note:
>> If I load in FirstPage it does work.
>> If I load it in ThirdPage it dowsn't.
>>
>>
>>
>> On 06/04/2013 03:31 PM, Wim de Vries wrote:
>>> On 06/04/2013 02:56 PM, and.berna...@gmail.com wrote:
>>>>
>>>> Maybe you forgot to add it to the qml.files variable in the .pro
>>>> file? Or to the .qrc, if you're using resources :)
>>> pro:
>>> # QML files and folders
>>> qml.files = *.qml pages cover main.qml
>>>
>>> and GroupBox.qml as well as MButtom.qml are in the pages directory
>>> (next to the qmls).
>>>
>>> r
>>> wim
>>>
>>>
>>>
>>>> *Da: *Wim de Vries
>>>> *Inviato: *martedì 4 giugno 2013 14:53
>>>> *A: *devel@lists.sailfishos.org
>>>> *Oggetto: *[SailfishDevel] QML: Unable to open input file: No
such file or
>>>> directory
>>>>
>>>>
>>>> Hi,
>>>> I am sandboxing the sailfishapplication.
>>>> In the page dir, I created my MButtom.qml.
>>>> This one is loaded in the SecondPage.
>>>> Works fine.
>>>> I also have a GroupBox.qml.
>>>> When I load this one I get:
>>>>
>>>> Unable to open input file: No such file or directory
>>>>
>>>>
>>>> SecondPage.qml:
>>>>
>>>> import QtQuick 1.1
>>>> import Sailfish.Silica 1.0
>>>>
>>>> Page {
>>>> id: page2
>>>> MButton
>>>> {
>>>> id: r1
>>>> buttonText: "MBUTTON"
>>>> }
>>>>
>>>> GroupBox
>>>> {
>>>> id : altWindow
>>>> }
>>>>
>>>> }
>>>>
>>>> Any hints.
>>>> Thanks.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> SailfishOS.org Devel mailing list
>>>
>>>
>>>
>>> _______________________________________________
>>> SailfishOS.org Devel mailing list
>>
>>
>>
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>
>
_______________________________________________
SailfishOS.org Devel mailing list
# The name of your app
TARGET = FoldersDemo
# C++ sources
SOURCES += main.cpp
# C++ headers
HEADERS +=
# QML files and folders
qml.files = *.qml pages cover controls main.qml
# The .desktop file
desktop.files = FoldersDemo.desktop
# Please do not modify the following line.
include(sailfishapplication/sailfishapplication.pri)
OTHER_FILES = rpm/FoldersDemo.yaml \
controls/HapticItem.qml
import QtQuick 1.1
import Sailfish.Silica 1.0
import "../controls"
Page {
id: page
// To enable PullDownMenu, place our content in a SilicaFlickable
SilicaFlickable {
anchors.fill: parent
// PullDownMenu and PushUpMenu must be declared in SilicaFlickable,
SilicaListView or SilicaGridView
PullDownMenu {
MenuItem {
text: "Show Page 2"
onClicked: pageStack.push(Qt.resolvedUrl("SecondPage.qml"))
}
}
// Tell SilicaFlickable the height of its content.
contentHeight: childrenRect.height
// Place our content in a Column. The PageHeader is always placed at
the top
// of the page, followed by our content.
Column {
width: page.width
spacing: theme.paddingLarge
PageHeader {
title: "UI Template"
}
Label {
x: theme.paddingLarge
text: "Hello Sailors"
color: theme.secondaryHighlightColor
font.pixelSize: theme.fontSizeLarge
}
//Comment HapticItem in or out to see (or not see) error
//Unable to open input file: No such file or directory
//QFeedbackFFMemless::QFeedbackFFMemless(QObject*) Error: did not
find vibra spi device!
HapticItem {
height: 100
width: parent.width
}
}
}
}
import QtQuick 1.1
import Sailfish.Silica 1.0
import "../controls"
Page {
id: page
SilicaListView {
id: listView
model: 20
anchors.fill: parent
header: PageHeader {
title: "Nested Page"
}
delegate: BackgroundItem {
Label {
x: theme.paddingLarge
text: "Item " + index
}
onClicked: console.log("Clicked " + index)
}
HapticItem {
y: 100
z: -10 //behind the listview
height: 100
width: parent.width
}
}
}
import QtQuick 1.1
import Sailfish.Silica 1.0
import QtMobility.feedback 1.1
Rectangle {
color: "black"
property alias text: thisLabel.text
HapticsEffect {id: rumbleEffect
attackIntensity: 0.0
attackTime: 250
intensity: 1.0
duration: 100
fadeTime: 250
fadeIntensity: 0.0
}
Label {
id: thisLabel
text: "Causes: Unable to open input file"
color: theme.secondaryHighlightColor
font.pixelSize: theme.fontSizeLarge
}
}
_______________________________________________
SailfishOS.org Devel mailing list