• 5425阅读
  • 1回复

[提问]qLineEdit的backspace()怎么不是只删除一个字母,而是一下clear了? [复制链接]

上一主题 下一主题
离线reconfig_ali
 

只看楼主 正序阅读 楼主  发表于: 2012-03-14
RT:
在移植好的qte中,想写一个button来模拟backspase的功能,无论是通过事件模拟Backspace键还是直接调用qLineEdit的backspace()函数,都直接一下清除了qLineEdit的内容。
有谁遇到过类似的现象?
离线wxj120bw

只看该作者 1楼 发表于: 2012-03-15
回 楼主(reconfig_ali) 的帖子
If no text is selected, deletes the character to the left of the text cursor and moves the cursor one position to the left. If any text is selected, the cursor is moved to the beginning of the selected text and the selected text is deleted.
qt4手册描述 估计跟qt3差不多 一下清空时选择全部文本吗?
快速回复
限100 字节
 
上一个 下一个