Use a QHash with either your QLabel or a QString as a lookup index for your alarm widget. There are many examples of similar lookups in QtDemo.

Qt Code:
  1. QHash <QLabel *, QWidget *> labelForWidget;
To copy to clipboard, switch view to plain text mode