• 9780阅读
  • 6回复

如何设置光标的位置呢? [复制链接]

上一主题 下一主题
离线icelee
 
只看楼主 倒序阅读 楼主  发表于: 2008-12-12
— 本帖被 XChinux 执行加亮操作(2009-01-13) —
我想把光标移到角落里怎么做?(用程序怎么写)
程序人生
离线lazybone
只看该作者 1楼 发表于: 2008-12-12
Qtjambi4.4.0 以textEdit的光标为例 
ui.textEdit.textCursor().movePosition(MoveOperation.End);  // 移动到最后
MoveOperation 常用值:
  MoveOperation Down -          Move down one line.
  MoveOperation End -          Move to the end of the document.
  MoveOperation EndOfBlock -          Move to the end of the current block.
  MoveOperation EndOfLine -          Move to the end of the current line.
  MoveOperation EndOfWord -          Move to the end of the current word.
  MoveOperation Left -          Move left one character.
  MoveOperation NextBlock -          Move to the beginning of the next block.
  MoveOperation NextCharacter -          Move to the next character.
  MoveOperation NextWord -          Move to the next word.
  MoveOperation NoMove -          Keep the cursor where it is
...
离线lj_0212

只看该作者 2楼 发表于: 2008-12-12
这个,依我看楼主的意思不是这个。
他是要实现类似于window平台的setCursorPos(int, int)这种功能。
离线icelee
只看该作者 3楼 发表于: 2008-12-16
搂上说的对,我是要实现类似于window平台的setCursorPos(int, int)这种功能,但是在LINUX下不知道如何设置,现在还没有解决,我索性把光标设置成透明的了,就相当于隐藏了,等需要的时候再SHOW出来。
程序人生
离线icelee
只看该作者 4楼 发表于: 2008-12-29
版主,帮我看看如何实现呀。。。。
程序人生
离线icelee
只看该作者 5楼 发表于: 2009-01-13
程序人生
离线duduqq

只看该作者 6楼 发表于: 2009-01-13
Qt4下QTest::mouseMove() ;可以移动光标
快速回复
限100 字节
 
上一个 下一个