• 6468阅读
  • 3回复

[提问]  QLineEdit 怎么显示char数组?(已解决,谢谢!) [复制链接]

上一主题 下一主题
离线wubo
 
只看楼主 倒序阅读 楼主  发表于: 2007-04-19
— 本帖被 XChinux 执行加亮操作(2008-07-19) —
我定义了一个char型数组,用来接受软键盘的输入(动态响应的),可是QLineEdit只接受QString const常量,怎么办呢?
[ 此贴被wubo在2007-04-20 22:38重新编辑 ]
离线andelf

只看该作者 1楼 发表于: 2007-04-19
QString::QString ( const QChar * unicode, int size )

Constructs a string initialized with the first size characters of the QChar array unicode.

QString makes a deep copy of the string data.
-------------------
QT_ASCII_CAST_WARN_CONSTRUCTOR QChar::QChar ( char ch )

Constructs a QChar corresponding to ASCII/Latin-1 character ch.
或者
QT_ASCII_CAST_WARN_CONSTRUCTOR QChar::QChar ( uchar ch )

Constructs a QChar corresponding to ASCII/Latin-1 character ch.
离线aaniao999

只看该作者 2楼 发表于: 2007-04-20
什么是软键盘阿?
小键盘?还是附加的键盘(多媒体键)?
离线wubo
只看该作者 3楼 发表于: 2007-04-20
是我自己做的数字键盘,由几个按钮响应,一个按钮触发了,就给char数组的一个单元传个字符,所以是动态的。QLineEdit(其它很多控件也是这样)只能显示const char,所以我不知道该怎么办
快速回复
限100 字节
 
上一个 下一个