There are two classes "background" and "modbus", the class "background" calls the button, which should go to another class and return data. I think the problem in emit is more precisely that they work separately.
I give a brief example:
class Background::pushbutton_clicked() // нажимаем кнопку в классе Background { QByteARray ba = modbus->get_data_slot(); // переходим в класс modbus и вызываем слот } QByteArray Modbus::get_data_slot() // slot класса Modbus { ba_fon; // глобальная переменная класса modbus return ba_fon; // по сигналу класса Modbus заходит в слот хочу добавить что сигнал написан в этом классе и скорее всего в этом проблема } It's clear that the engine comes to the Background class empty (((Actually, the drivers are connected like this: modbus -> background.
There was an idea to create another "data complite" signal and transmit them back, but how to transmit them will swear on the cyclical dependence of the classes.