Hi,all.
I create a window subwin in one dialog and define Q3ListBox listbox in it.Then I redefine the Q3ListBox in mainwindow as listbox = subwin.listbox,the QFile file is defined in the mainwindow driectly.there are some lines in my code when I add them the error is segment fault.
The lines are as follows:
char ReadData[100];
int i=0;
int point = listbox->numRows();
file.seek(0);
while(!file.atEnd()){
file.readLine(ReadData,100);
strTempSource = QString(ReadData);
list->insertItem(strTempSource,point+i);
i++;
}
Can anyone help me?