Just a short question:
I wish to edit the text of a QLabel object outside of its slot, depending on the value of a conditional statement unrelated to the widget. Research online has been inconclusive, so I would greatly appreciate if any of you could clarify how this is done.
Thanks!
Edit: I used Qt Designer to put the QLabel in my MainWindow class, meaning it was never formally declared within my MainWindow.cpp source code. Here is an explanation with code:
if (webcam.isOpened() == false)
{
MainWindow::mainVideo.setText("Stream is offline.")
/*mainVideo is my QLabel, I need to figure out how to access this if
*it was placed into my UI via Qt Designer.
*/
}
Must be use:
In your case: