Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

ItemEditorStyle

Provides custom styling for the ItemEditor. More...

Import Statement: import Felgo 3.0
Inherits:

QtObject

Properties

Detailed Description

You can create a custom ItemEditor by replacing the according delegate of the ItemEditorStyle with a custom design. If you want to restyle all ItemEditors in your app it is advised to use GameStyle to restyle the elements.

Example Usage

Following example adjusts the background of the item editor.

 ItemEditor {
   id: itemEditor
   itemEditorStyle: ItemEditorStyle {
     contentDelegateBackground: Rectangle {
         anchors.fill: parent
         border.width: 2
         border.color: "#ff0000"
         radius: 4
         gradient: Gradient {
             GradientStop { position: 0 ; color: "#ccc" }
             GradientStop { position: 1 ; color: "#aaa"  }
         }
     }
     contentDelegateTypeList: Rectangle {
         anchors.fill: parent
         border.width: 2
         border.color: "#ff0000"
         radius: 4
         gradient: Gradient {
             GradientStop { position: 0 ; color: "#eee" }
             GradientStop { position: 1 ; color: "#ccc" }
         }
     }
   }
 }

If you need a custom label, you can replace the label item properties.

See also ItemEditor and GameStyle.

Property Documentation

contentDelegateBackground : Component

This Component is used to change the style of the ContentDelegate background used by the ItemEditor.


contentDelegateTypeList : Component

This Component is used to change the style of the TypeList background in the ContentDelegate used by the ItemEditor.


label : Text

This Component is used to change the style of the Text items used in all delegates of the ItemEditor.


Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded