Always try to use the lowest common denominator.
All objects of the main window are accessible via the main window, thus change the text of a component of the main window inside a function or slot of the main window.
Example
void MainWindow::slotButtonClicked()
{
int result = doSomething();
if (result == 1)
button->setText("New text");
}
int MainWindow::doSomething()
{
return something;
}
void MainWindow::slotButtonClicked()
{
int result = doSomething();
if (result == 1)
button->setText("New text");
}
int MainWindow::doSomething()
{
return something;
}
To copy to clipboard, switch view to plain text mode
Bookmarks