Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Call function in ui.qml!

Call function in ui.qml!

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 592 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.
  • H Offline
    H Offline
    Hesam
    wrote on last edited by
    #1

    Please help me!
    how can i call a c++ function in ui.qml file?!

    ODБOïO 1 Reply Last reply
    0
    • H Hesam

      Please help me!
      how can i call a c++ function in ui.qml file?!

      ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by
      #2

      hi @Hesam you can't, functions are not supported in ui forms. https://doc.qt.io/qtcreator/creator-quick-ui-forms.html#javascript-functions
      Why do you need to call a function in the .ui.qml ? Why not call it in the component (.qml)

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hesam
        wrote on last edited by
        #3

        thank you for your response
        I started a project on Qt Design Studio and then convert it into a Quick project
        Now the only files I have are ui.qml files
        Now I need to call the signals from the c ++ files
        this is my question: how can i call c++ function when i clicked on a shape in ui.qml file?

        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