Closed ljesparis closed 8 years ago
1 - does it work on desktop? 2 - Can you post the file that is using the Icon element, if any? Il 11/ott/2015 05:50 AM, "Leonardo Esparis" notifications@github.com ha scritto:
i have this warnings or error, while deploying to android device...
W/libRobotHand.so( 3053): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63 ((null)): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63:5: QML Image: Cannot open: file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/icons/qrc:/images.svg W/libRobotHand.so( 3053): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63 ((null)): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63:5: QML Image: Cannot open: file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/icons/qrc:/images.svg W/libRobotHand.so( 3053): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63 ((null)): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63:5: QML Image: Cannot open: file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/icons/qrc:/images.svg W/libRobotHand.so( 3053): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63 ((null)): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63:5: QML Image: Cannot open: file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/icons/qrc:/images.svg W/libRobotHand.so( 3053): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63 ((null)): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63:5: QML Image: Cannot open: file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/icons/qrc:/images.svg
this is my *.pro file
TEMPLATE = app TARGET = RobotHand
QT += qml quick svg bluetooth core
CONFIG += c++11
SOURCES += main.cpp \ src/device.cpp \ src/devicemodel.cpp
HEADERS += \ include/device.h \ include/devicemodel.h
RESOURCES += qml.qrc Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH = Default rules for deployment.
include(deployment.pri)
DISTFILES += \ android/AndroidManifest.xml \ android/gradle/wrapper/gradle-wrapper.jar \ android/gradlew \ android/res/values/libs.xml \ android/build.gradle \ android/gradle/wrapper/gradle-wrapper.properties \ android/gradlew.bat \ android/gradle.properties \ android/local.properties
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
— Reply to this email directly or view it on GitHub https://github.com/papyros/qml-material/issues/307.
only on android... =S
import QtQuick 2.5
import Material 0.1
import 'qrc:/scripts/viewController.js' as ViewFunctions
ApplicationWindow {
id: app
visible: true
title: qsTr("Robot Hand")
width: 300
height: 500
minimumHeight: 500
minimumWidth: 300
theme {
id: theme
primaryColor: Palette.colors["blue"]["100"]
primaryDarkColor: Palette.colors["blue"]["900"]
accentColor: Palette.colors["red"]["A200"]
backgroundColor : Palette.colors["grey"]["100"]
tabHighlightColor: "#bdbdbd"
}
Dialog
{
id: appInfo
hasActions: false
height: ViewFunctions.infoDialogHeight();
Rectangle
{
anchors.fill: parent
Text
{
id: informationTitle
text: "Information."
color: "#757575"
font.bold: true
font.underline: true
font.family: "Roboto"
anchors.top: parent.top
anchors.topMargin: Units.dp(7)
anchors.horizontalCenter: parent.horizontalCenter
}
Text
{
id: teamInfo
anchors.top: informationTitle.bottom
anchors.topMargin: Units.dp(10)
color: "#757575"
font.family: "Roboto"
text: "Team:\nM-DD\n\nContributors: \nLeonardo Esparis\nFreddy Villegas\nMerwil Vegas"
}
}
}
// loading efect
Rectangle{
id: loading
visible: false
opacity: 0.7
anchors.fill: parent
width: parent.width
height: parent.height
color: theme.tabHighlightColor
Timer
{
id: timer
interval: 500
running: loading.visible? true: false;
repeat: true
onTriggered: ViewFunctions.loadingEffect();
}
ProgressCircle
{
id:circle
anchors.centerIn: parent
visible: true
color: "black"
}
Text {
id: loadingText
text: "loading"
anchors.horizontalCenter: circle.horizontalCenter
anchors.top: circle.bottom
anchors.topMargin: Units.dp(10)
}
Text {
id: dots
text: ""
anchors.top: circle.bottom
anchors.topMargin: Units.dp(10)
anchors.left: loadingText.right
}
}
initialPage: TabbedPage
{
title: app.title
actionBar.maxActionCount: 2
actionBar.backgroundColor: theme.primaryDarkColor
Rectangle
{
anchors.fill: parent
color: theme.backgroundColor
}
actions: [
Action
{
iconSource: "qrc:/images/info"
onTriggered: appInfo.show();
}
]
// this is the icon that does not work properly..
backAction: Action
{
id: backAction
visible: false;
iconName: "qrc:/images/arrowBack"
onTriggered:ViewFunctions.back();
}
Loader
{
id: loader
objectName: 'mainLoader'
source: "qrc:/views/home.qml"
anchors.fill: parent
anchors.horizontalCenter: parent.horizontalCenter
}
}
}
I don't quite get which icon you are referring to, whether the preceding one or the backAction. If the latter, with iconSource you can specify your own image files, with iconName you should use only the Material design and fontawesome icons provided by the library. Take a look at the demo for proper usage of both. Il 11/ott/2015 02:39 PM, "Leonardo Esparis" notifications@github.com ha scritto:
only on android... =S
import QtQuick 2.5 import Material 0.1 import 'qrc:/scripts/viewController.js' as ViewFunctions ApplicationWindow { id: app visible: true title: qsTr("Robot Hand") width: 300 height: 500 minimumHeight: 500 minimumWidth: 300
theme { id: theme primaryColor: Palette.colors["blue"]["100"] primaryDarkColor: Palette.colors["blue"]["900"] accentColor: Palette.colors["red"]["A200"] backgroundColor : Palette.colors["grey"]["100"] tabHighlightColor: "#bdbdbd" } Dialog { id: appInfo hasActions: false height: ViewFunctions.infoDialogHeight(); Rectangle { anchors.fill: parent Text { id: informationTitle text: "Information." color: "#757575" font.bold: true font.underline: true font.family: "Roboto" anchors.top: parent.top anchors.topMargin: Units.dp(7) anchors.horizontalCenter: parent.horizontalCenter } Text { id: teamInfo anchors.top: informationTitle.bottom anchors.topMargin: Units.dp(10) color: "#757575" font.family: "Roboto" text: "Team:\nM-DD\n\nContributors: \nLeonardo Esparis\nFreddy Villegas\nMerwil Vegas" } } } // loading efect Rectangle{ id: loading visible: false opacity: 0.7 anchors.fill: parent width: parent.width height: parent.height color: theme.tabHighlightColor Timer { id: timer interval: 500 running: loading.visible? true: false; repeat: true onTriggered: ViewFunctions.loadingEffect(); } ProgressCircle { id:circle anchors.centerIn: parent visible: true color: "black" } Text { id: loadingText text: "loading" anchors.horizontalCenter: circle.horizontalCenter anchors.top: circle.bottom anchors.topMargin: Units.dp(10) } Text { id: dots text: "" anchors.top: circle.bottom anchors.topMargin: Units.dp(10) anchors.left: loadingText.right } } initialPage: TabbedPage { title: app.title actionBar.maxActionCount: 2 actionBar.backgroundColor: theme.primaryDarkColor Rectangle { anchors.fill: parent color: theme.backgroundColor } actions: [ Action { iconSource: "qrc:/images/info" onTriggered: appInfo.show(); } ] // this is the icon that does not work properly.. backAction: Action { id: backAction visible: false; iconName: "qrc:/images/arrowBack" onTriggered:ViewFunctions.back(); } Loader { id: loader objectName: 'mainLoader' source: "qrc:/views/home.qml" anchors.fill: parent anchors.horizontalCenter: parent.horizontalCenter } }
}
— Reply to this email directly or view it on GitHub https://github.com/papyros/qml-material/issues/307#issuecomment-147189262 .
backAction, it is the icon that does not work correctly... even, if i use iconSource... i am using a timer to change to another view... but, when the view has changed, the icon is a white square.
@leoxnidas take a look at this bug and workaround, it might be it: https://github.com/papyros/qml-material/issues/267
ok... let me try... @marco-piccolino
does not work those solutions... =S
If you prepare a minimal version of your project and upload it I can look into it Il 12/ott/2015 09:31 PM, "Leonardo Esparis" notifications@github.com ha scritto:
does not work those solutions... =S
— Reply to this email directly or view it on GitHub https://github.com/papyros/qml-material/issues/307#issuecomment-147498231 .
sorry, sorry.. it works one solution, but, how do i move an icon in the action bar? the icon that does not work correctly, is in the action bar.. @marco-piccolino
@leoxnidas you might want to use the gitter chat to get help of this kind, it's easier and cleaner. If the problem with the icons above is solved, please close the issue. thanks
@leoxnidas is this issue cleared? if so, please close it.
i have this warnings or error, while deploying to android device...
W/libRobotHand.so( 3053): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63 ((null)): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63:5: QML Image: Cannot open: file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/icons/qrc:/images.svg W/libRobotHand.so( 3053): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63 ((null)): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63:5: QML Image: Cannot open: file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/icons/qrc:/images.svg W/libRobotHand.so( 3053): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63 ((null)): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63:5: QML Image: Cannot open: file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/icons/qrc:/images.svg W/libRobotHand.so( 3053): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63 ((null)): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63:5: QML Image: Cannot open: file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/icons/qrc:/images.svg W/libRobotHand.so( 3053): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63 ((null)): file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/Icon.qml:63:5: QML Image: Cannot open: file:///data/data/org.qtproject.example/qt-reserved-files/qml/Material/icons/qrc:/images.svg
this is my *.pro file
TEMPLATE = app TARGET = RobotHand
QT += qml quick svg bluetooth core
CONFIG += c++11
SOURCES += main.cpp \ src/device.cpp \ src/devicemodel.cpp
HEADERS += \ include/device.h \ include/devicemodel.h
RESOURCES += qml.qrc
QML_IMPORT_PATH =
include(deployment.pri)
DISTFILES += \ android/AndroidManifest.xml \ android/gradle/wrapper/gradle-wrapper.jar \ android/gradlew \ android/res/values/libs.xml \ android/build.gradle \ android/gradle/wrapper/gradle-wrapper.properties \ android/gradlew.bat \ android/gradle.properties \ android/local.properties
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android