C
VncItem QML Type
Item for creating a VNC®-compatible server. More...
Import Statement: | import QtVncServer |
Properties
- connectionEnabled : bool
- grabMode : enumeration
- password : string
- remoteInputEnabled : bool
- serverName : string
(since 6.8)
- serverState : enumeration
- vncAddress : QString
(since 6.8)
- vncPort : int
Detailed Description
VncItem is a Qt Quick Item which will share its children over the RFB® protocol. It can be the top-level item in the scene for sharing the full window, or any rectangular part of it. Resizing the item will also resize the frames shared with clients.
As soon as the VncItem is initialized, it will accept connections.
Property Documentation
connectionEnabled : bool |
This property decides whether the server accepts new connections. Set this to false
to reject new connections. It is true
by default.
grabMode : enumeration |
This property specifies the visual content that is transmitted to the client. It must be set before a client connects: changes to this property is ignored while clients are connected.
Constant | Description |
---|---|
VncItem.GrabItemRectangle | The client will show the part of the window that is covered by the item's geometry. This includes popup windows and overlapping siblings. This mode is the default. |
VncItem.GrabItemIsolated | The client will show just the content of the item and the item's children within the geometry of the item. Popups and overlapping sibling are excluded. This means that combo boxes and menus will not work properly from the client. This mode will usually give better performance. |
VncItem.GrabWindow | The client will show the entire contents of the item's window, regardless of the geometry of the item. This is useful when sharing an ApplicationWindow, for example, since the menu bar and tool bars will be outside the item's geometry. |
password : string |
When set, this property enables DEC Authentication on the server and remote clients will have to provide a matching password to connect.
Note: DEC authentication is considered weak protection, and the connection itself is not encrypted. This protects mainly against accidental intrusion, but not against targeted attacks.
Note: This depends on the availability of LibTomCrypt, otherwise it will have no effect.
remoteInputEnabled : bool |
This property decides whether input from remote clients is processed. If set to false
then clients will only be able to see the contents of the VncItem, but not actually interact with it. The default is true
.
serverName : string |
This property holds the name of the server. This name will be sent to connecting clients as part of the ServerInit
message.
This property was introduced in Qt 6.8.
serverState : enumeration |
This property indicates the current state of the server.
vncAddress : QString |
The IP address to which VncItem binds the VNC port to for listening new incoming connections. Value of "0.0.0.0" will listen on all network interfaces.
The default value is "0.0.0.0".
This property was introduced in Qt 6.8.
vncPort : int |
This property decides the port on which the VncItem listens to new connections. If set to a negative number, the server will try ports 5900 to 5999 successively until it finds an available port. The vncPort property will be updated automatically when an actual port is assigned.
The default value is 5900.
Available under certain Qt licenses.
Find out more.