Ifoerster
19th April 2014, 12:22
Hello,
I have a problem to send data from a doubleclick QListWidgetItem from a sub window to the parent window. I use the default connection:
connect(ui.driveList,
SIGNAL(itemDoubleClicked(QListWidgetItem *)),
this, SLOT(openDiskWrap(QListWidgetItem *)));
With this I call the function in the sub window:
void OpenProject::openDiskWrap(QListWidgetItem *item)
{
int currentRow = ui.driveList->currentRow();
((MainWindow*)this->parentWidget())->openDisk(currentRow);
//openDisk(int index)
}
It works so far ok, but it seems that there is a sandbox because in Mainwindow / OpenDisk I get read errors (Access violation) in a QStringArray and other members of MainWindow.
So I think I have a logical flaw inside. What I finaly need to do is to send the Index of the driveList to the Mainwindow to open the selected drive.
Any suggestion help?
Ingo
I have a problem to send data from a doubleclick QListWidgetItem from a sub window to the parent window. I use the default connection:
connect(ui.driveList,
SIGNAL(itemDoubleClicked(QListWidgetItem *)),
this, SLOT(openDiskWrap(QListWidgetItem *)));
With this I call the function in the sub window:
void OpenProject::openDiskWrap(QListWidgetItem *item)
{
int currentRow = ui.driveList->currentRow();
((MainWindow*)this->parentWidget())->openDisk(currentRow);
//openDisk(int index)
}
It works so far ok, but it seems that there is a sandbox because in Mainwindow / OpenDisk I get read errors (Access violation) in a QStringArray and other members of MainWindow.
So I think I have a logical flaw inside. What I finaly need to do is to send the Index of the driveList to the Mainwindow to open the selected drive.
Any suggestion help?
Ingo