Create a custom QBrush object from qml for custom chart



  • Hello, I'm currently designing a GUI with QML.
    I'm using ChartView to draw a chart and I want to customize its colors.

    I could change every color except the axis title, that needs the replace of a Brush and I can't create one.

    ValueAxis {               
        id: temp_y_axis       
        min: 0                
        max: 30               
        tickCount: 5          
        gridVisible: false    
        color: "white"        
                              
        titleText: "Temp (ºC)"
        titleBrush:             /* wanted something like QBrush(Qt.white) here */
                              
        labelFormat: "%d"     
        labelsFont.bold: true 
        labelsColor: "white"  
    }                         
    

    I spent the whole day searching for ways to customize this, can anyone help me?

    Thanks in advance


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.