Reply
Thread Tools
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#141
Originally Posted by mikecomputing View Post
just a notice but it seems like qt5.2 will be releases in november. Since nokia wiped qt it seems like qtdevs has gone nuts with releases
Also checkout the newly supported mobile platforms:
Sailfish, Android, BB10, Tizen, Ubuntu-Touch, WinRT, iOS,...

Not really possible until the conflict of interest caused by Nokia owning Qt & having their own mobile platform/s at the same time.
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 
Posts: 1,298 | Thanked: 2,277 times | Joined on May 2011
#142
Picking up pace is good. It was really unusual that Nokia let Qt go so easily. Knowing their latest trollish attitude (with attacking VP8 codec with patents for example), they could easily create a lot of problems for Qt.
 
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#143
How can I access all the icons that can be used in Sailfish apps? e.g. icon-cover-pause

================

In my Sailfish app, my main.cpp looks like that

Code:
#include <QGuiApplication>
#include <QQuickView>
#include <QtQml>

#include "sailfishapplication.h"
#include "settings.h"

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc, argv));
    QScopedPointer<QQuickView> view(Sailfish::createView("main.qml"));
    qmlRegisterType<Settings>("BigText", 1, 0, "Settings");
    
    Sailfish::showView(view.data());

    return app->exec();
}
And in main.qml I import the module like that:

Code:
import QtQuick 2.0
import Sailfish.Silica 1.0
import BigText 1.0
import "pages"

ApplicationWindow
{
    initialPage: MainPage { }
    Settings {id: settings}
}
The error is:
Code:
file:///opt/sdk/BigText/usr/share/BigText/main.qml:3:1: module "BigText" is not installed 
     import BigText 1.0 
     ^
QtCreator doesn't show up an error while editing. Such calls were 100% valid in com.nokia.meego.

What am I doing wrong?

thanks
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here

Last edited by marmistrz; 2013-08-21 at 08:55.
 
Posts: 1,067 | Thanked: 2,383 times | Joined on Jan 2012 @ Finland
#144
marmistrz are you trying to use qmlRegisterType from QtQuick1 vs QtQuick2. Atleast I dont see you including #include <QQmlEngine>

http://qt-project.org/forums/viewthread/28488

And icons you can easily find in filesystem if you login.
__________________
IRC: jonni@freenode
Sailfish: ¤ Qt5 SailfishTouchExample ¤ Qt5 MultiPointTouchArea Example ¤ ipaddress ¤ stoken ¤ Sailbox (Dropbox client) ¤
Harmattan: ¤ Presence VNC for Harmattan ¤ Live-F1 ¤ BTinput-terminal ¤ BabyLock ¤ BabyLock Trial ¤ QML TextTV ¤
Disclaimer: all my posts in this forum are personal trolling and I never post in any official capacity on behalf of any company.
 

The Following User Says Thank You to rainisto For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#145
Originally Posted by rainisto View Post
marmistrz are you trying to use qmlRegisterType from QtQuick1 vs QtQuick2. Atleast I dont see you including #include <QQmlEngine>

http://qt-project.org/forums/viewthread/28488

And icons you can easily find in filesystem if you login.
Adding <QQmlEngine> fixes nothing. Or should the 5-arg qmlRegisterType be used for QtQuick2. Or do I have to do something else than qmlRegisterType to register a QObject-inheriting class in QML.

Code:
#include <QGuiApplication>
#include <QQuickView>
#include <QQmlEngine>
#include <QtQml>
Where exactly are the icons? (They aren't in /usr/share/themes)

/edit: when going to sb2, it's indeed there. How can I copy it onto local hard disk?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here

Last edited by marmistrz; 2013-08-21 at 14:23.
 
Posts: 1,067 | Thanked: 2,383 times | Joined on Jan 2012 @ Finland
#146
If your not able to get qmlRegisterType working, then you can always use setContextProperty().

And ofcourse you have tested to move qmlRegisterType line before creating the view? Since otherwise it tries to import things that dont exist yet?
__________________
IRC: jonni@freenode
Sailfish: ¤ Qt5 SailfishTouchExample ¤ Qt5 MultiPointTouchArea Example ¤ ipaddress ¤ stoken ¤ Sailbox (Dropbox client) ¤
Harmattan: ¤ Presence VNC for Harmattan ¤ Live-F1 ¤ BTinput-terminal ¤ BabyLock ¤ BabyLock Trial ¤ QML TextTV ¤
Disclaimer: all my posts in this forum are personal trolling and I never post in any official capacity on behalf of any company.

Last edited by rainisto; 2013-08-22 at 07:43.
 

The Following User Says Thank You to rainisto For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#147
Originally Posted by rainisto View Post
If your not able to get qmlRegisterType working, then you can always use setContextProperty().

And ofcourse you have tested to move qmlRegisterType line before creating the view? Since otherwise it tries to import things that dont exist yet?
Code:
Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc, argv));
    QScopedPointer<QQuickView> view(Sailfish::createView("main.qml"));
    qmlRegisterType<Settings>("BigText", 1, 0, "Settings");
    
    Sailfish::showView(view.data());

    return app->exec();
}
There are situations where setContextProperty won't be an option (when the properties change on the fly and the UI has to respond to the changes)
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here

Last edited by marmistrz; 2013-08-22 at 08:56.
 
Posts: 58 | Thanked: 13 times | Joined on Jan 2010 @ Los Angeles
#148
Originally Posted by rcolistete View Post
3) How do I copy files between host PC and Sailfish SDK Emulator ?
The host PC folder "~/SailfishOS/vmshare/" is shared to "/etc/mersdk/share/" in Sailfish Emulator. So you can copy files and folders there. Be careful to not delete the folder "ssh" and file "devices.xml".
I can only get files from my PC to show in the emulator. How do I move something from the emulator to the PC? I'm being told the folder is read only.

Thanks to anyone who can help.
 
Posts: 1,067 | Thanked: 2,383 times | Joined on Jan 2012 @ Finland
#149
Originally Posted by marmistrz View Post
Code:
Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc, argv));
    QScopedPointer<QQuickView> view(Sailfish::createView("main.qml"));
    qmlRegisterType<Settings>("BigText", 1, 0, "Settings");
    
    Sailfish::showView(view.data());

    return app->exec();
}
There are situations where setContextProperty won't be an option (when the properties change on the fly and the UI has to respond to the changes)
Code:
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"));
    
    Sailfish::showView(view.data());

    return app->exec();
}
Just double checking that you already tried to register before createView?

You can use setContextProperty just fine when properties change on the fly and make UI respond to changes. Nothing prevents that.
__________________
IRC: jonni@freenode
Sailfish: ¤ Qt5 SailfishTouchExample ¤ Qt5 MultiPointTouchArea Example ¤ ipaddress ¤ stoken ¤ Sailbox (Dropbox client) ¤
Harmattan: ¤ Presence VNC for Harmattan ¤ Live-F1 ¤ BTinput-terminal ¤ BabyLock ¤ BabyLock Trial ¤ QML TextTV ¤
Disclaimer: all my posts in this forum are personal trolling and I never post in any official capacity on behalf of any company.

Last edited by rainisto; 2013-08-22 at 11:20.
 

The Following User Says Thank You to rainisto For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#150
Well, indeed... create != show ;P Bad habits from Qt 4.7
Sorry for polling the thread ;P and thanks!

Btw. if a textfield is on the bottom, the vkb covers it whole. Will it be fixed in the final release?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here

Last edited by marmistrz; 2013-08-22 at 13:12.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 15:14.