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. Can't set focus to ScrollView using Qt.ClickFocus
Forum Updated to NodeBB v4.3 + New Features

Can't set focus to ScrollView using Qt.ClickFocus

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
scroll viewtextfieldcontrolsfocusfocus issue
1 Posts 1 Posters 242 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.
  • H Offline
    H Offline
    HelloWorld2041
    wrote on 10 Sept 2023, 22:33 last edited by HelloWorld2041 9 Oct 2023, 22:36
    #1

    Hey there. I just want my TextField to lose focus when i click on ScrollView, but the problem is scrollview does not accept the focus using Qt.ClickFocus

    import QtQuick
    import QtQuick.Controls.Universal
    
    ApplicationWindow {
        visible: true
        width: 600
        height: 400
    
        ScrollView {
            anchors.fill: parent
            focusPolicy: Qt.ClickFocus
    
            TextField {
                id: textField
                implicitWidth: 400
                implicitHeight: 50
            }
        }
    }
    

    is this a freaking bug?

    1 Reply Last reply
    0

    1/1

    10 Sept 2023, 22:33

    • Login

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