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. Fickable + TextField + InputContext
Forum Updated to NodeBB v4.3 + New Features

Fickable + TextField + InputContext

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 1.5k 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.
  • R Offline
    R Offline
    Reptile
    wrote on last edited by
    #1

    Anyone have any idea how to force scroll the Flickable to a specific child if the Flickable is resized due to the inputContext's visibility?

    ETA:

    So each TextField has a function like so:
    @
    TextField {
    ...
    onActiveFocusChanged: if (activeFocus) Flick.ScrollTo(textfieldid)
    }
    @
    In the Flick.js
    @
    function scrollTo(child) {

    flickable.contentY = child.y + child.height - flickable.height;

    }
    @
    Here's where I run into some problems. When the contentY changes, the flickable seems to steal focus. When that happens, the inputContext is no longer visible (the vkb goes away). After the inputContext goes into hiding, the flickable resizes back to normal (it's anchored to the top of the inputContext's item). Is there a way to have the TextField maintain focus while the flickable scrolls? Or am I looking at the problem the wrong way?

    [Edit: Please wrap code in @ tags. Thanks -- mlong]

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Reptile
      wrote on last edited by
      #2

      Updated. Has anyone done something similar?

      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