
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc, argv));
qmlRegisterType<Settings>("BigText", 1, 0, "Settings");
QScopedPointer<QQuickView> view(Sailfish::createView("main.qml"));
Settings settings_object;
view->rootContext()->setContextProperty("settings", &settings_object);
Sailfish::showView(view.data());
return app->exec();
}
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc, argv));
QScopedPointer<QQuickView> view(Sailfish::createView());
Settings settings_object;
view->rootContext()->setContextProperty("settings", &settings_object);
Sailfish::setView(view.data(), "main.qml");
Sailfish::showView(view.data());
return app->exec();
}
| The Following 2 Users Say Thank You to rainisto For This Useful Post: | ||
import QtQuick 2.0
import Sailfish.Silica 1.0
import Sailfish.Silica.theme 1.0
Dialog
{
property string selectedFont
DialogHeader
{
id: header
acceptText: "Select font"
}
SilicaListView
{
anchors.top: header.bottom
anchors.bottom: parent.bottom
spacing: Theme.paddingSmall
model: Qt.fontFamilies()
delegate: ListItem
{
id: listItem
contentHeight: 60
width: parent.width
Label
{
id: label
text: modelData
anchors.left: parent.left
anchors.leftMargin: Theme.paddingLarge
color: listItem.highlighted ? Theme.highlightColor : Theme.primaryColor
// color: Theme.primaryColor
//height: 60
}
onHighlightedChanged: console.log(highlighted)
}
VerticalScrollDecorator {}
}
}
Dialog
{
id: root
SilicaListView
{
header: DialogHeader
{
id: header
acceptText: "Select font"
}
/**/
}
}
| The Following User Says Thank You to minimos For This Useful Post: | ||
lsb_release -a
# /etc/vconsole.conf KEYMAP="sv-latin1"
>>> from PyQt5 import QtQuick Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: /usr/lib/python2.7/site-packages/PyQt5/QtQml.so: undefined symbol: _ZN11QQmlPrivate10createIntoI13QPyQmlObject5EEvPv
| The Following User Says Thank You to xerxes2 For This Useful Post: | ||