import QtQuick 2.6;
import QtQuick.Controls 2.1 ;
import QtQuick.Layouts 1.3 ;
Page{
id: page
width: 800
height: 1024
background: Rectangle {
color: "black" ;
anchors.fill:parent ;
}
Rectangle {
id:rect1
x: 0
y:10
width: 100
height: 100
color : "red"
MouseArea {
anchors.fill: parent
onClicked: tmr.restart()
}
}
Rectangle {
id:rect2
x: 0
y:110
width: 100
height: 100
color : "blue"
MouseArea {
anchors.fill: parent
onClicked: tmr.restart()
}
}
Timer {
id : tmr
interval : 30000
repeat : true …Run Code Online (Sandbox Code Playgroud) 您好我需要对文件夹中的所有文件进行排序,但我遇到了问题,因为我需要按索引对它们进行排序.我给你举个例子:
我的文件格式如下:dateHoursMinutes_index_nameOfFile.dat
以前我曾经Array.Sort(_myFiles);对它们进行排序,但现在我需要按顺序对它们进行排序.
我如何使用linq来做到这一点?
谢谢
我在我的项目中使用Qt快速虚拟键盘,当我点击一个对象时,我想显示键盘,但只显示数字.我怎样才能做到这一点?
这就是我想要做的

我data = [0, 4, -109, -31]从 modbus得到这个,我知道这一点,data = 300001但我不知道如何正确转换它以达到那个300001。我尝试了很多网上找到的方法,但我还没有得到它的工作。感谢您的任何帮助
编辑:据我所知,0需要移动24,4移动16,-109 (256-109 = 147)所以它会147并且需要移动,8最后一个-31 (256-31 = 225)我们照原样。快速回顾一下data = [0, 4, 147, 225],0 * 2^24 + 4 * 2^16 + 147 * 2^8 + 225 = 300001
现在需要对此进行编纂。有什么正确的方法可以在js中做到这一点吗?