int QFtp::get ( const QString & file, QIODevice dev = 0, TransferType type = Binary )
If dev is 0, then the readyRead() signal is emitted when there is data available to read You can then read the data with the read() or readAll() functions
QT中提取QTextEdit文本框中的内容,代码如下
int a[100];QString str = ui->textEdit->toPlainText();
int len = strlength();
for(int i = 0; i < len; ++i)
{
QChar t = strat(i);
a[i] = ttoAscii() - '0';
}
'textEdit的数据合理性以及数组大小自己去设定给你说下大概的流程吧 textedit按行读取 然后建立一个qstring的容器 读取各行数据 按钮点击后进行排序 然后把数据输出到textbrowser 其实没必要这样用 直接建立一个qtablewidget 输入内容后点击headeritem 应该直接就可以排序的思路是读整行,再用字符串函数来处理。
建议用 stringsplit(“ ”) 把字符串 分割到数组里面,再逐个赋值给变量。
参考示例 >
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)