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 ToolBar: Binding loop detected for property "implicitHeight"
Qt 6.11 is out! See what's new in the release blog

QML ToolBar: Binding loop detected for property "implicitHeight"

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 2.2k 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.
  • S Offline
    S Offline
    sush123
    wrote on last edited by sush123
    #1

    Hi All,

    I get this issue for ToolBar

    QML ToolBar: Binding loop detected for property "implicitHeight"

    ToolBar {
    id: titleBar
    RowLayout {
    anchors.fill: parent
    ToolButton {
    action: dirUpAction
    style: IconButtonStyle { }
    Layout.maximumWidth: height * 1.5
    }
    TextField {
    id: currentPathField
    Layout.fillWidth: true
    function doAccept() {
    root.clearSelection()
    if (root.addSelection(root.pathToUrl(text)))
    root.accept()
    else
    root.folder = root.pathFolder(text)
    }
    onAccepted: doAccept()
    }
    }
    }

    How can i fix this?

    ODБOïO 1 Reply Last reply
    0
    • S sush123

      Hi All,

      I get this issue for ToolBar

      QML ToolBar: Binding loop detected for property "implicitHeight"

      ToolBar {
      id: titleBar
      RowLayout {
      anchors.fill: parent
      ToolButton {
      action: dirUpAction
      style: IconButtonStyle { }
      Layout.maximumWidth: height * 1.5
      }
      TextField {
      id: currentPathField
      Layout.fillWidth: true
      function doAccept() {
      root.clearSelection()
      if (root.addSelection(root.pathToUrl(text)))
      root.accept()
      else
      root.folder = root.pathFolder(text)
      }
      onAccepted: doAccept()
      }
      }
      }

      How can i fix this?

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

      @sush123 hi
      Are you sure the error comes from this code? I have no error when i test this.
      what is your Qt and QtQuick.Controls version ?

      import QtQuick 2.12
      import QtQuick.Controls 2.12
      import QtQuick.Window 2.12
      import QtQuick.Layouts 1.3
      
      Window {
          visible: true
          width: 300
          height: 300
      
          ToolBar {
              id: titleBar
              width: parent.width
              RowLayout {
                  anchors.fill: parent
                  ToolButton {
                      Layout.maximumWidth: height * 1.5
                  }
      
                  TextField {
                      id: currentPathField
                      Layout.fillWidth: true
                      function doAccept() {
                          root.clearSelection()
                          if (root.addSelection(root.pathToUrl(text)))
                              root.accept()
                          else
                              root.folder = root.pathFolder(text)
                      }
                      onAccepted: doAccept()
                  }
              }
          }
      }
      

      //main.cpp

      #include <QGuiApplication>
      #include <QQmlApplicationEngine>
      #include <QApplication>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          QQmlApplicationEngine engine;
          const QUrl url(QStringLiteral("qrc:/main.qml"));
          QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
                           &app, [url](QObject *obj, const QUrl &objUrl) {
              if (!obj && url == objUrl)
                  QCoreApplication::exit(-1);
          }, Qt::QueuedConnection);
          engine.load(url);
          return app.exec();
      }
      
      

      i have Qt 5.14.0

      1 Reply Last reply
      1
      • S Offline
        S Offline
        sush123
        wrote on last edited by
        #3

        Hi ,
        when i click on file:///C:/Qt/5.12.8/msvc2017_64/qml/QtQuick/Dialogs/DefaultFileDialog.qml:407:9: QML ToolBar: Binding loop detected for property "implicitHeight"

        it goes to C:\Qt\5.12.8\msvc2017_64\qml\QtQuick\Dialogs\DefaultFileDialog.qml file.

        i have Qt 5.12.8

        ODБOïO 1 Reply Last reply
        0
        • S sush123

          Hi ,
          when i click on file:///C:/Qt/5.12.8/msvc2017_64/qml/QtQuick/Dialogs/DefaultFileDialog.qml:407:9: QML ToolBar: Binding loop detected for property "implicitHeight"

          it goes to C:\Qt\5.12.8\msvc2017_64\qml\QtQuick\Dialogs\DefaultFileDialog.qml file.

          i have Qt 5.12.8

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

          @sush123 can you try to run the example i sent to you ?

          1 Reply Last reply
          1

          • Login

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