TableView report binding loop detected for xxxxxx
-
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QtQuick/QQuickView> int main(int argc, char *argv[]) { QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QQuickView::setSceneGraphBackend(QSGRendererInterface::Software); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); if (engine.rootObjects().isEmpty()) return -1; return app.exec(); }
import QtQuick 2.9 import QtQuick.Window 2.2 import QtQuick.Controls 1.4 Window { visible: true width: 640 height: 480 color: "#00000000" flags: Qt.FramelessWindowHint title: qsTr("Hello World") ListModel { id: libraryModel ListElement { title: "A Masterpiece" author: "Gabriel" } ListElement { title: "Brilliance" author: "Jens" } ListElement { title: "Outstanding" author: "Frederik" } } TableView { id: tableView x: 145 y: 221 height: 168 TableViewColumn { role: "title" title: "Title" } TableViewColumn { role: "author" title: "Author" } model: libraryModel } Button { id: button x: 516 y: 132 text: qsTr("Button") onClicked: { Qt.quit() } } }
Qt will report information like this
file:///E:/Qt/5.11.2/5.11.2/mingw53_32/qml/QtQuick/Controls/Private/BasicTableView.qml:615:17: QML Item: Binding loop detected for property "width"Qt Ver: Qt 5.11.2
I search on internet, but i can not find any idea about this!
-
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QtQuick/QQuickView> int main(int argc, char *argv[]) { QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QQuickView::setSceneGraphBackend(QSGRendererInterface::Software); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); if (engine.rootObjects().isEmpty()) return -1; return app.exec(); }
import QtQuick 2.9 import QtQuick.Window 2.2 import QtQuick.Controls 1.4 Window { visible: true width: 640 height: 480 color: "#00000000" flags: Qt.FramelessWindowHint title: qsTr("Hello World") ListModel { id: libraryModel ListElement { title: "A Masterpiece" author: "Gabriel" } ListElement { title: "Brilliance" author: "Jens" } ListElement { title: "Outstanding" author: "Frederik" } } TableView { id: tableView x: 145 y: 221 height: 168 TableViewColumn { role: "title" title: "Title" } TableViewColumn { role: "author" title: "Author" } model: libraryModel } Button { id: button x: 516 y: 132 text: qsTr("Button") onClicked: { Qt.quit() } } }
Qt will report information like this
file:///E:/Qt/5.11.2/5.11.2/mingw53_32/qml/QtQuick/Controls/Private/BasicTableView.qml:615:17: QML Item: Binding loop detected for property "width"Qt Ver: Qt 5.11.2
I search on internet, but i can not find any idea about this!
@JohnDaYe you might have set tableview width value somewhere else in some other file. Try to search it and remove it. Also Try setting width value of tableview.
-
@JohnDaYe you might have set tableview width value somewhere else in some other file. Try to search it and remove it. Also Try setting width value of tableview.
@Tirupathi-Korla
I try it, but do not resolved -
Tried on 5.11.0. It is working fine. I just did copy-paste of your code. It could be issue with 5.11.2. Can you downgrade & check ? Or the code you pasted has some changes at your end. Please check.
-
Tried on 5.11.0. It is working fine. I just did copy-paste of your code. It could be issue with 5.11.2. Can you downgrade & check ? Or the code you pasted has some changes at your end. Please check.
@dheerendra 5.11.0 has the same issue
-
which OS ? I tried on mac with 5.11.0. It is going good. I will try on other OS and update you.
-
I've got the very same issue.
void MainWindow::on_connect_triggered() { acq = new acquisition(this); if(acq->startAcquisition()){ foreach(CANbus * can, acq->can) { if(can->connectDevice()){ can->m_view = new QQuickView(can->setEngine(), window); can->m_view->setSource(QUrl("qrc:/view.qml")); QWidget * container = createWindowContainer(can->m_view,this); ui->horizontalLayout->addWidget(container); } } ui->retranslateUi(this); } } MainWindow::on_disconnect_triggered() { if(ui->horizontalLayout->count()>0){ QLayoutItem *child; while ((child = ui->horizontalLayout->takeAt(0)) != 0) { delete child; } } ui->retranslateUi(this); foreach(CANbus * can, acq->can) { QWidget *container = createWindowContainer(can->m_view,this); ui->horizontalLayout->removeWidget(container); can->disconnectDevice(); delete can; } delete acq; acq = nullptr; }
When I instantiate my QQuickView for the first time I don't have the problem. It only occurs when I reconnect my device each time after:
file:///C:/DLI/Dev/build-testCan-Desktop_Qt_5_11_1_MinGW_32bit-Debug/debug/QtQuick/Controls/Private/BasicTableView.qml:615:17: QML Item: Binding loop detected for property "width"
I have no clue how to get rid of this problem...
-
@dheerendra
Using the same code, 5.10.1 find the same issue.
Windows 7 & mingw32