Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Theme in -QT- Qt Quick components

Theme in -QT- Qt Quick components

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 3.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nishithmahajan
    wrote on last edited by
    #1

    HI all,
    I was trying to use the -QT- Qt Quick components for symbian . in Meego it was fairly easy to change the theme colour using theme.inverted = false.
    how can I do that in Symbian? do we have an api to do that?

    kind regards
    Nish

    1 Reply Last reply
    0
    • S Offline
      S Offline
      srikanth_trulyit
      wrote on last edited by
      #2

      Never came across such in Symbian ( to my best of knowledge). But you can easily change themes by creating different qml files for each theme namely, and apply it in your qml either by property binding or a simple state change.

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nishithmahajan
        wrote on last edited by
        #3

        but doesn't that defeat the whole purpose of having QT components? We were supposed to use QT components to reduce our coding. I was not able to find any sort of property in the Window and Toolbar component to change the background colour. Just to change the colour will I have to create a new QML for these components?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          srikanth_trulyit
          wrote on last edited by
          #4

          bq. Just to change the colour will I have to create a new QML for these components

          No, you can change the color within the QML if you know what the color you are about to change. But when it comes to professional/enterprise apps, the designers want more freedom to change the themes. It is not a good design approach to keep dynamic materials like skins inside code. So you have to create a new QML file with just the skin elements as properties.

          @
          // auroraSkin.qml
          Item {
          id: auroraSkin
          property string bkgImage: "qrc:/images/bkg.jpg";
          property string homeIcon: "qrc:/images/tb_home.svg";
          property color fontColor: "#661100"
          property int titleFontSize: 40
          property int subTitleFontSize: 30
          property int contentFontSize: 23
          property int contentMargin: 8
          }
          @

          @
          // aquaBlueSkin.qml
          Item {
          id: aquaBlueSkin
          property string bkgImage: "qrc:/images/bkgblue.jpg";
          property string homeIcon: "qrc:/images/tb_home_aqua.svg";
          property color fontColor: "#AA2150"
          property int titleFontSize: 35
          property int subTitleFontSize: 20
          property int contentFontSize: 20
          property int contentMargin: 11
          }
          @

          When a Item property is referred as skin, it makes switching the skins more easy.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved