| 12345678910111213141516171819202122232425262728293031323334 |
- import QtQuick 2.6
- import QtQuick.Window 2.2
- import gfa.plugins.qml.net 1.0
- Window {
- visible: true
- width: 640
- height: 480
- title: qsTr("Hello World")
- NetInterfaces {
- id: idItf
- }
- MouseArea {
- anchors.fill: parent
- onClicked:
- {
- if(idItf.initialize())
- {
- var ifs = idItf.getInterface("eth1");
- if(ifs.length > 0)
- {
- console.log(ifs[0].ipAddress);
- }
- else
- {
- console.log("No interface found!");
- }
- }
- }
- }
- }
|