Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 lineEdits 数组:
QLineEdit *cells[81];
但是当我尝试在其中设置文本时,我得到了一个段错误:
cells[i]->setText(QString::number(i));
如何访问这些元素?
解决它。我设置了私有数组,然后在本地范围内重新声明了它。不知怎的,这并没有发出警告......