用qt交叉编译程序时出现QString has no member name latin1错误是什么原因,如何解决呢 QString 只有下面这两个与 latin1 相关的函数: QByteArray QString::toLatin1() QString QString::fromLatin1(const char * str, int size = -1) void TMainForm::sendButtonClicked() { QString text( m_sendEdit->text() ); if (text.isEmpty()) { return ; } ::write(m_fd, text.latin1(), text.length()); m_sendEdit->setText(""); } ::write(m_fd, text.latin1(), text.length());
这行代码,latin1() 修改为 toLatin1() 。
|