Hi,

I have this problem with my Qt application that I was hoping one of you could help me with.
In this application I have the classes ColorSelect and DeviceDialog, each with its own ui. But I'm getting errors because I'm trying to call functions from each other.
I know that this isn't allowed because of a thing called circular dependency, so I was wondering what I can do instead that is allowed/won't give me errors?
(I have included devicedialog.h in colorselect.h and vice versa)

in my colorselect.cpp:

void ColorSelect::on_listWidget_itemDoubleClicked(QList WidgetItem *item)
{
//launches the device dialog where data is entered in line edits
DeviceDialog dialog;
dialog.setLineEdits(item->data(Qt::UserRole).toString());
dialog.setModal(true);
dialog.exec();
}

in my devicedialog.cpp:

void DeviceDialog::on_buttonBox_accepted()
{
//sets listWidgetItem data (found in colorselect.ui) with text from line edits (found in devicedialog.ui)
colorSelect->setItemData(ui->houseLineEdit->text(), ui->unitLineEdit->text());
}

//Leutzig