1. Keeeo's Avatar
    Hello everyone,
    i would like to learn programing for bb phones. I dont have problems with programing itself. Issue i have is in class design and communication inside app itself. Documentation on BB web don't really help me with that, since its focused in explaining bb related things and not this abstract problem.

    I would like to make model part in C++ and view part as QML. The issue is that i cant find a reasonable solution to connect these two parts together. I can inject model facade inside qml, but how for example will i construct gameboard?

    (C++ model contains multiple columns which contains multiple cards, QML has templates for card, column and gameboard)
    12-04-14 08:55 AM
  2. LoganSix's Avatar
    Wouldn't you just create a Container in QML and add the needed images for the game board?
    Then you can insert the objects into the Container.
    12-04-14 11:25 AM
  3. Keeeo's Avatar
    Wouldn't you just create a Container in QML and add the needed images for the game board?
    Then you can insert the objects into the Container.
    Well yes, but i would like to have model separated from view. Here is example of model integrated into view qt-project.org/doc/qt-5/qml-advtutorial.html, as you can see its not useful for larger apps or learning how to make things properly.
    12-04-14 01:06 PM
  4. LoganSix's Avatar
    Are you having issues connecting from c++ to the QML?
    QML and C++ integration

    Or just the general way of doing things?
    12-04-14 02:24 PM
  5. Keeeo's Avatar
    Thanks for your response. After few days of thinking it over i realized how it should be done. I didn't realize i can send QObject from C++ to QML and thought that only basic values can be transfered. With this i can make model in C++ inject it in QML and grab another MyObjects from that. One specific question come to mind. Can i send descendants of QObject to QML like QList<MyObject*>? It prints error: "unable to handle unregistered datatype" QList<MyObject*> but MyObject was registered(qmlRegisterType<MyObject>("my.library", 1, 0, "MyObject")) and if not mentioned(defined with QObject*) works fine.
    12-09-14 07:54 PM
  6. LoganSix's Avatar
    I think you can only send objects that you can normally call in QML.
    12-10-14 11:17 AM

Similar Threads

  1. Maximum account limit reached on Passport
    By FullSpectrum in forum BlackBerry Passport
    Replies: 92
    Last Post: 08-13-15, 11:12 AM
  2. Sharing contacts on 1151
    By spoonman9696 in forum BlackBerry 10 OS
    Replies: 15
    Last Post: 07-08-15, 12:49 AM
  3. Replies: 8
    Last Post: 02-14-15, 04:57 AM
  4. Can the bb passport run on t-mobiles 4g network?
    By rojam86 in forum BlackBerry Passport
    Replies: 13
    Last Post: 12-04-14, 10:11 PM
  5. How do I change the APN on my BB Q10?
    By CrackBerry Question in forum Ask a Question
    Replies: 2
    Last Post: 12-04-14, 12:27 PM
LINK TO POST COPIED TO CLIPBOARD