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. How I can to paste text at cursor position of focused input element?
Forum Update on Monday, May 27th 2025

How I can to paste text at cursor position of focused input element?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 442 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.
  • M Offline
    M Offline
    maratoriy
    wrote on 15 Nov 2020, 21:29 last edited by
    #1

    I have a GridView with ToolButtons (kind of keyboard). I want a click on a symbol to copy it to the cursor position regardless of which input element it is in (based on focus)
    Thank you in advance!

    7ad6b1f2-8fdd-4646-89b4-87ffbc145590-image.png

    J 1 Reply Last reply 16 Nov 2020, 06:32
    0
    • M maratoriy
      15 Nov 2020, 21:29

      I have a GridView with ToolButtons (kind of keyboard). I want a click on a symbol to copy it to the cursor position regardless of which input element it is in (based on focus)
      Thank you in advance!

      7ad6b1f2-8fdd-4646-89b4-87ffbc145590-image.png

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 16 Nov 2020, 06:32 last edited by
      #2

      @maratoriy You can iterate over https://doc.qt.io/qt-5/qobject.html#children and check which child has focus using https://doc.qt.io/qt-5/qwidget.html#focus-prop

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply 18 Nov 2020, 17:11
      3
      • J jsulm
        16 Nov 2020, 06:32

        @maratoriy You can iterate over https://doc.qt.io/qt-5/qobject.html#children and check which child has focus using https://doc.qt.io/qt-5/qwidget.html#focus-prop

        M Offline
        M Offline
        maratoriy
        wrote on 18 Nov 2020, 17:11 last edited by
        #3

        @jsulm A lot of thanks!

        1 Reply Last reply
        0

        1/3

        15 Nov 2020, 21:29

        • Login

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