Hello everyone. i have one problem:
i have MainWindow subclassing from QMainWindow. at this window i place custom widget for example named FlyMap and its class will be QFlyMap. from that class i can grab some data, for example position of cursor, when click.
also at mainwindow there are some labels. How can i set text to that labels from MousePressEvent event from this FlyMap.
so...
in QMainWindow:
QFlyMap* map = new QFlyMap(this);
map->setGeometry(400,100,400,400);
rightLay->addWidget(map);//QFlyMap.
...
l_ppm_nomer = new QLabel(s_ppm);
l_ppm_nomer->setGeometry(400,500,300,15);
in QFlyMap i have that function:
protected:
void QFlyMap::mousePressEvent(QMouseEvent *event)
how can i change text of some labels (l_ppm_nomer), that are from MainWindow class?
in the constructor of QFlyMap it sends QWidget* parent, may be from that i can reach those labels?