Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

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.