Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to use Style property in QtQuick.Controls 2.2 in Qt 5.9

How to use Style property in QtQuick.Controls 2.2 in Qt 5.9

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 301 Views
  • 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.
  • S Offline
    S Offline
    Shalini Alex
    wrote on last edited by
    #1

    Hello developers,
    Previously we was using QtQuick.Controls 1.4 in our code. In some machines ComboBox and ScrollView got freeze while using. While searching it has mentioned that in QtQuick.Controls 2.2 this freezing was resolved. But in Controls 2.2 i can't access the style property in Qt 5.9 .

    Existing Code

    import QtQuick 2.0
    import QtQuick.Controls 1.4
    import QtQuick.Controls.Styles 1.2
    ScrollView {
        id: control
        anchors.fill: parent
        clip: true
        style: FusionScrollViewStyle {
        }
    }
    

    Within this FusionScrollViewStyle we was using our custom styles in qml.

    Trying to implement:

    import QtQuick 2.0
    import QtQuick.Controls 2.2
    import QtQuick.Controls.Styles 1.2
    ScrollView {
        id: control
        anchors.fill: parent
        clip: true
        style: FusionScrollViewStyle {
        }
    }
    

    In above code Style property was not accessible.
    Showing Error Cannot assign to non-existent property "style"
    Is there any possibility to use style property QtQuick.Controls 2.2 in Qt 5.9 ?
    Or How can I give custom style to any component.

    Thank You!!!

    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