0

I am emiting a signal from mainwindow to my editor class where my event filter is placed is there any way for enent filter react to Signals

mainwindow:

connect(this, SIGNAL(MidiMessage(QString)),Editor, 
SLOT(getMsgfromUi(QString)));

emit  MidiMessage(QString::number(message->getStatus()));

my editor class:

bool Editor::eventFilter(QObject *o, QEvent *e)
  {
    if (e->type()==??signal
  }
eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Sonicpath
  • 231
  • 4
  • 16
  • 1
    Possible duplicate of [What are the differences between event and signal in Qt](https://stackoverflow.com/questions/9323888/what-are-the-differences-between-event-and-signal-in-qt) – eyllanesc May 30 '18 at 04:37
  • another duplicate: https://stackoverflow.com/questions/3794649/qt-events-and-signal-slots – eyllanesc May 30 '18 at 04:39
  • 2
    Signals and events are 2 different things. – eyllanesc May 30 '18 at 04:39
  • No, you can't since a signal isn't an event. You *can* emit a signal from an event handler if you wish, but you can't compare them. `eventFilter()` in your example has nothing to do with any singal; it just filters out events and executes the desired commands. – Petross404 Mar 10 '22 at 17:58

0 Answers0