×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    506

    how to make qtquick mutiplatform

    Hi

    I'm writing Symbian/Harmattan C++/QML application and wonder is there an tips and tricks how to make QML part multiplatform?
    In C/C++ there is ifdef's etc, but what about QML?
    how to setup different window/control sizes for different platforms?
    how to include different components libraries?

    thanks
    Symbian & Qt developer. http://vladest.org

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: how to make qtquick mutiplatform

    Even i am interested to know whether macros work in QML or not. If its work then how to use macros in QML, because simple macros that we use in Qt are not working in QML.

  3. #3
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: how to make qtquick mutiplatform

    There are no macros for QML. You need to switch QML files using C++ in this way, for instance:

    #if defined(Q_OS_SYMBIAN)
    viewer->setMainQmlFile(QLatin1String("qml/untitled1/main-symbian.qml"));
    #else
    viewer->setMainQmlFile(QLatin1String("qml/untitled1/main-harmattan.qml"));
    #endif

  4. #4
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: how to make qtquick mutiplatform

    Keeping separate QML file is not good solution. Sometime even for same platform we need macros. For example, for a product, customer "X" wants feature "a" and "b" and customer "Y" want feature "a" only. We can not keep two separate code base for the same product. There must be some alternative to macros.

Similar Threads

  1. Is there a QtQuick / components roadmap?
    By tube42 in forum [Archived] Qt Quick
    Replies: 5
    Last Post: 2011-09-09, 21:36
  2. QtQuick 1.1 available?? Help please
    By lukakiarelli in forum [Archived] Qt Quick
    Replies: 4
    Last Post: 2011-06-21, 07:01
  3. QtQuick and QWebFrame::toPlainText()
    By ad5xj in forum [Archived] Qt Quick
    Replies: 1
    Last Post: 2011-04-17, 17:24
  4. QtQuick/QML or Native
    By bluechrism in forum [Archived] Qt Quick
    Replies: 1
    Last Post: 2011-02-27, 22:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×