I have the following code in my constructor:
xRotLabel
= new QLabel(this);
// "QLabel *xRotLabel;" is in .h filexRotLabel->setText("Initial Text");
connect(mb0pButton, SIGNAL(buttonClicked()), this, SLOT(changeText()));
xRotLabel = new QLabel(this); // "QLabel *xRotLabel;" is in .h file
xRotLabel->setText("Initial Text");
connect(mb0pButton, SIGNAL(buttonClicked()), this, SLOT(changeText()));
To copy to clipboard, switch view to plain text mode
here's the changeText() function:
void Window::changeText()
{
xRotLabel->setText("Changed Text");
}
void Window::changeText()
{
xRotLabel->setText("Changed Text");
}
To copy to clipboard, switch view to plain text mode
I want to click the "mb0pButton" to make the text in the QLabel change, but it's not working. What am I missing?
Bookmarks