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. QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Forum Updated to NodeBB v4.3 + New Features

QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 540 Views 2 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.
  • K Offline
    K Offline
    kimnov
    wrote on last edited by
    #1

    Hello,
    I am using Qt Design Studio and I get the above error for my code in a .ui.qml file:

    Connections {
    target: loginButton
    onClicked: rectangle.state = "Login"
    }
    If I change the code according to the suggestion. I get an error that functions are not allowed in ui.qml files.
    What are the right code guidelines for my code?
    Thanks a bunch

    ODБOïO 1 Reply Last reply
    0
    • K kimnov

      Hello,
      I am using Qt Design Studio and I get the above error for my code in a .ui.qml file:

      Connections {
      target: loginButton
      onClicked: rectangle.state = "Login"
      }
      If I change the code according to the suggestion. I get an error that functions are not allowed in ui.qml files.
      What are the right code guidelines for my code?
      Thanks a bunch

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

      @kimnov hi
      Add a property alias for your loginButton in your *.ui.qml file, then move your Connections to the *.qml file that goes with the *.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