Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor sami.mahjoub's Avatar
    Join Date
    Dec 2010
    Posts
    63
    Hi all,
    I have 2 questions;
    First, in case I already have a class that contain some methods, should I add signals to all the Q_INVOKABLE methods ?
    Also, I want to know if I already have an user interafce (containing classes with methods running operations on a Data Base!) and I want to got the same in QML should I rewrite all classes to make them Shape to be used in QML ?

    Thank u for any help

  2. #2

  3. #3
    Regular Contributor sami.mahjoub's Avatar
    Join Date
    Dec 2010
    Posts
    63
    thanks for the link and how about my second question ?

  4. #4
    Regular Contributor sami.mahjoub's Avatar
    Join Date
    Dec 2010
    Posts
    63
    I want to know when I already have an user interafce (containing classes with methods running operations on a Data Base!) and I want to got the same in QML should I rewrite all classes to make them Shape to be used in QML ?

  5. #5
    Registered User akrynski's Avatar
    Join Date
    Nov 2010
    Posts
    17
    If your classes doesn't have any shape and you uses only pure methods, properties etc. the answer is not. In addition your class shoud inherit from QObject. In other case, if your class have shape it should inherit from QDeclarativeItem. There are many examples and tutorials. Try to read one.
    Furthermore you shoud register your classes to use with qml: qmlRegisterType<your_class_as_type>("Library_name", version_nr, revision_nr, "Name_of_type_useable_in_qml");
    And in qml file add import Library_name 1.0 (version.revision)

Similar Threads

  1. How to call/load another QML file from QML ?
    By cadlg in forum [Archived] Qt Quick
    Replies: 5
    Last Post: 2011-07-28, 09:15
  2. How to export a C++ method to QML?
    By useryy2 in forum [Archived] Qt Quick
    Replies: 2
    Last Post: 2011-05-15, 11:36
  3. How to create and save object to put in another qml?
    By VVNart in forum [Archived] Qt Quick
    Replies: 4
    Last Post: 2011-05-08, 06:57
  4. How to debug qml app to nokia n97
    By Supernova746 in forum [Archived] Beginning Qt
    Replies: 1
    Last Post: 2011-03-14, 20:57

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved