QML Debugger: Waiting for connection on port

1 篇文章 0 订阅

调试qml 出现QML Debugger: Waiting for connection on port xxx...解决办法

在项目生成程序文件夹下按住shift+鼠标右键,在弹出的菜单中选择 在此处打开Powershell窗口(s)

在PowerShell窗口中输入 qmlprofiler -p <port> -attach <ip address> ,回车

例如:qmlprofiler -p 12345 -attach 127.0.0.1

之后回到qtCreator , 选择调试(D)->开始调试->关联到QML端口...

将刚才设置的端口号(例如:12345)输入到端口中,点击OK

将应用程序输出窗口中的项目全部删除,清除工程重新编译下就可以调试qml了。

 

 

 

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
This error message occurs when there is a circular dependency between the properties in the QML code. Specifically, it means that the property "currentIndex" is dependent on itself or on another property that is dependent on "currentIndex". This can happen when a property is trying to update itself based on its own value, or when there is a recursive relationship between two or more properties. To fix this error, you will need to identify the source of the circular dependency and break the loop. This may involve reorganizing your QML code or using a different approach to your data binding. Here are some tips for troubleshooting and resolving the issue: 1. Check your property assignments: Look for any properties that are assigned to themselves or to another property that depends on them. For example: currentIndex: someOtherProperty + currentIndex This kind of assignment creates a circular dependency and will trigger the error message. 2. Use property aliases: If you have two properties that depend on each other, you can use property aliases to avoid the circular dependency. For example: property alias myPropertyAlias: myProperty property int myProperty: myPropertyAlias + 1 This way, both properties can be updated independently without causing a loop. 3. Use a different approach: If you cannot break the circular dependency using property aliases or other techniques, you may need to rethink your approach to the data binding. This may involve using a different data model or a different QML component to achieve your desired result. Overall, the "Binding loop detected" error is a common issue in QML development, but it can be resolved with some careful analysis and troubleshooting. By identifying the source of the circular dependency and breaking the loop, you can ensure that your QML code runs smoothly and without errors.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值