Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved] How to Change character at cursor position?
QtWS25 Last Chance

[Solved] How to Change character at cursor position?

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 1.7k 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.
  • D Offline
    D Offline
    dreamerindia
    wrote on last edited by
    #1

    how to change the character at cursor position in the QLineedit?

    ~Ravivarman~

    1 Reply Last reply
    0
    • M Offline
      M Offline
      marsupial
      wrote on last edited by
      #2

      I guess the simplest way would be to just use the "cursorPosition()":https://qt-project.org/doc/qt-4.8/qlineedit.html#cursorPosition-prop to get the cursor pos, then you use "text()":https://qt-project.org/doc/qt-4.8/qlineedit.html#text-prop to get the text, manipulate the string at the cursor position and set it again with "setText()":https://qt-project.org/doc/qt-4.8/qlineedit.html#text-prop

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dreamerindia
        wrote on last edited by
        #3

        Yes. Thank you. I used cursorPosition() and solved by work around.

        ~Ravivarman~

        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