Qml Debug
This library also provide a tool object that demonstrate every Qmls functionality. This is intended for quick debug, or test functionalities if UI isnβt built yet.
In order to use this qml object into another qml file, multiple steps are required.
- Call
net::tcp::Utils::registerTypes(...)
to registerAbstractServer
,Server
,AbstractSocket
, β¦ to the qml system - Call
net::tcp::Utils::loadResources()
to load everyNetTcp
resources into theqrc
.
Then simply to something like that:
import NetTcp.Debug 1.0 as NetTcpDebug
import NetTcp 1.0 as NetTcp
Rectangle
{
property NetTcp.Server server
property NetTcp.Socket client
width: 300
height: 300
Column
{
width: parent.width
NetTcpDebug.Server
{
object: server
width: parent.width
}
NetTcpDebug.Socket
{
object: client
width: parent.width
}
}
}
NetTcp.Debug.Server
is aQaterial.DebugObject
. If you want the raw content to display it somewhere else, then useNetTcp.Debug.ServerContent
that is aColumn
.NetTcp.Debug.Socket
is aQaterial.DebugObject
. If you want the raw content to display it somewhere else, then useNetTcp.Debug.SocketContent
that is aColumn
.
Example
A basic example NetTcp_EchoClientServerQml
also demonstrate the same example as the C++ examples, but with qml debug widget.