Results 1 to 2 of 2

Thread: QTextEdit getCursorPosition in Qt4 (...and how to fully migrate to Qt4?)

  1. #1
    Join Date
    Apr 2007
    Location
    Toruń, POLAND
    Posts
    24
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    7

    Default QTextEdit getCursorPosition in Qt4 (...and how to fully migrate to Qt4?)

    Hello,

    My specific question is how to mimic Qt3 getCursorPosition using native QTextEdit from Qt4, not using Q3TextEdit (of course in the latter case there would be no need to mimic anything, such method simply exists for Q3TextEdit).

    So -- what methods should I call to get the paragraph index and character index? I've read Qt manual, but I didn't find it.

    Thanks in advance.

    More general question though is -- where can I find description how to fully migrate to Qt4? I can use Q3 classes in Qt4 and this works, but now I want to use only Qt4 native classes, and I substituting Qt3 methods with Qt4 equivalents (as above) is not easy (due to fact the manual only covers what is left, not what was removed and how to handle it).

    have a good day, bye

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: QTextEdit getCursorPosition in Qt4 (...and how to fully migrate to Qt4?)

    Quote Originally Posted by macias View Post
    So -- what methods should I call to get the paragraph index and character index? I've read Qt manual, but I didn't find it.
    How about QTextCursor::blockNumber() and QTextCursor::columnNumber()?

  3. The following user says thank you to jacek for this useful post:

    macias (23rd April 2007)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.