当前位置: 动力学知识库 > 问答 > 编程问答 >

c++ - QT4 settext() with array of lineEdits

问题描述:

I have an array of lineEdits:

QLineEdit *cells[81];

But when I try and set the text in them I get a segfault:

cells[i]->setText(QString::number(i));

How can I access these elements?

网友答案:

Fixed it. I set the private array and then redeclared it in local scope. Somehow that didn't make a warning...

分享给朋友:
您可能感兴趣的文章:
随机阅读: