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

[qmltc]: Text.onTextChanged qmltc error

XMLWordPrintable

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

      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)
                         ^
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes