Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Using qml in the qt application

Using qml in the qt application

Scheduled Pinned Locked Moved Mobile and Embedded
11 Posts 5 Posters 4.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mot_201
    wrote on last edited by
    #1

    hi all , am a beginner in developing qt applications , i need a full example for using a qml file in the qt application , please give me a full example - every line i must write please - as when i copy it , it works properly ...

    my regards :))

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on last edited by
      #2

      http://doc.trolltech.com/latest/qmlruntime.html

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mot_201
        wrote on last edited by
        #3

        my thanks to you , BUT ...
        the code isn't working , it gave me the following errors : 'class QDeclarativeView' has no member named 'setSource'
        error: 'QUrl' has not been declared

        error: 'class QDeclarativeView' has no member named 'show'

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mot_201
          wrote on last edited by
          #4

          i used " #include<QtDeclarative/qdeclarativeview.h> " instead of " #include <QDeclarativeView>
          " because it couldn't find it , & now i have another errors like that one error: undefined reference to `_imp___ZN16QDeclarativeView9setSourceERK4QUrl'

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mot_201
            wrote on last edited by
            #5

            when i used " #include <QDeclarativeView> " i got that error " error: QDeclarativeView: No such file or directory "

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Scylla
              wrote on last edited by
              #6

              Propably you have forgotten to set QT += declarative in your pro file!

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mot_201
                wrote on last edited by
                #7

                yeaaaaaaaa thaaaaaaanks tooooo much :):D it works :))

                i have another question , how to add an icon & add event to it in qml ?

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  thisisbhaskar
                  wrote on last edited by
                  #8

                  May be you should look at Image and MouseArea items in qml documentation @ http://doc.qt.nokia.com/4.7/qdeclarativeelements.html

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mot_201
                    wrote on last edited by
                    #9

                    thanks so much :))

                    1 Reply Last reply
                    0
                    • I Offline
                      I Offline
                      imrrk
                      wrote on last edited by
                      #10

                      Hello mot_201,you should read the Qt documentation,because it will solve your most of the problems..

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mot_201
                        wrote on last edited by
                        #11

                        ok imrrk , i'll do ,, thanks so much :))

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved