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. Setting a different cursortype for lineedit
QtWS25 Last Chance

Setting a different cursortype for lineedit

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.8k 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.
  • L Offline
    L Offline
    lepepper
    wrote on last edited by
    #1

    Any ideas how to set a different cursor type to QLineedit.
    I tried th efollowing,Doesn't work.
    @
    class a:public Qlineedit
    {
    }

    a()
    {
    setCursor(QT:IBeamCursor);
    }
    @

    [edit: Mark up code, Tobias Hunger]

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

      As far as I know, it's not possible, at least there is no public API.

      setCursor() only changes the mouse cursor:

      bq. "QWidget::setCursor() ":http://doc.qt.nokia.com/stable/qwidget.html#cursor-prop
      The mouse cursor will assume this shape when it's over this widget.

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

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lepepper
        wrote on last edited by
        #3

        is it possible to add QTextCursor to display a custom cursor in QLineEdit

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

          QTextCursor is not about visual appearance but only about positions and selections in a text document.

          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