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

Forums

OverviewFelgo 2 Support (Qt 5) › SimpleRow icon color

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24278

    Evgeniy

    Hi all!

    How to set different colors for icon and text in SimpleRow?

    I haven’t found the iconColor in Theme.listItem (ThemeSimpleRow), and textColor applied to icon too.

    #24280

    Jon-Paul

    You can make the icon a different colour to the text by using the following:

    icon.color: "blue"

    I tend to have my own theme Item in QML that references Theme and adds any properties I need. I would then customise existing QML items with those properties.

    For example, MyTheme.qml:

    pragma Singleton
    
    import Felgo 3.0
    
    Item
    {
        property color iconColour: "blue"    // New custom property
        property var theme: Theme            // Provides access to Theme so this item is the main point for all theme related stuff
    }

    And MySimpleRow.qml:

    import Felgo 3.0
    
    SimpleRow
    {
        icon.color: MyTheme.iconColour
    }

     

    Hope that helps

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded