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. Text cursor in QPlainTextEdit
QtWS25 Last Chance

Text cursor in QPlainTextEdit

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 3.4k 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.
  • E Offline
    E Offline
    erik kruyt
    wrote on last edited by
    #1

    I create a QPlainTextEdit and load a file. However, I do not get a position cursor (a vertical line), even not after a mouse click. Only after an edit I get the position cursor. What is needed to show the cursor right away or after a mouse click?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #2

      Hi,

      Sounds really strange. Seems like a problem with the focus event but it might also occur if the QPlainTextEdit is set to read-only in certain case.

      Cheers,
      Leon

      http://anavi.org/

      1 Reply Last reply
      0
      • E Offline
        E Offline
        erik kruyt
        wrote on last edited by
        #3

        The window has the focus. It happens in a viewer with Readonly properties and also in an editor (not readonly). If I click with the mouse on a location no textcursor shows up. When I change the position using the keyboard (e.g. right arrow) the textcursor shows up correctly with the Qt::IBeamCursor.
        Any more ideas?
        Erik

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          Can you create a simple, complete, small test program to demonstrate this behavior?

          http://www.catb.org/~esr/faqs/smart-questions.html

          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