Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-109755

[qmltc]: Text.onTextChanged qmltc error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • 6.5
    • 6.4.1
    • QML: Compiler
    • None

    Description

      import QtQuick
      
      Text {
          id: root
          onTextChanged: {
              console.log("yada")
          }
      }
      

      gives me this error:

      /path/to/mytext.cpp:85: error: no matching function for call to object of type 'const QOverload<QString>'
      /path/to/mytext.cpp:85:28: error: no matching function for call to object of type 'const QOverload<QString>'
          QObject::connect(this, qOverload<QString>(&MyText::textChanged), this, &MyText::textChanged_slot);
                                 ^~~~~~~~~~~~~~~~~~
      /home/tim/bin/qt-6.4.1/include/QtCore/qglobal.h:1308:20: note: candidate template ignored: could not match 'QString' against 'const QString &'
          constexpr auto operator()(R (T::*ptr)(Args...)) const noexcept -> decltype(ptr)
                         ^
      /home/tim/bin/qt-6.4.1/include/QtCore/qglobal.h:1320:20: note: candidate template ignored: could not match 'R (QString) const' against 'void (const QString &)'
          constexpr auto operator()(R (T::*ptr)(Args...) const) const noexcept -> decltype(ptr)
                         ^
      /home/tim/bin/qt-6.4.1/include/QtCore/qglobal.h:1337:20: note: candidate template ignored: could not match 'R (*)(QString)' against 'void (QQuickText::*)(const QString &)'
          constexpr auto operator()(R (*ptr)(Args...)) const noexcept -> decltype(ptr)
                         ^
      

      Attachments

        Issue Links

          Activity

            People

              sami.shalayel Sami Shalayel
              timblechmann tim blechmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: