Ferric
31st January 2010, 05:34
Hi,
I am trying to find a way to change the text displayed on a button, currently I have created a button:
QPushButton *uploadButton = new QPushButton(tr("Upload To Unit number one"));
and once I have clicked this button, I would like the button label to be changed to something like
"Upload To Unit number two"
I know I can use something like:
uploadButton->setText("upload to unit number two");
But when I put this in a slot that is activated by the signal emitted by the uploadButton, my application just quits,
I think maybe I have to declare the uploadButton as a "Global" widget( if you know what I mean), but I'm not sure how to do this..
Any advice appreciated, Thanks
I am trying to find a way to change the text displayed on a button, currently I have created a button:
QPushButton *uploadButton = new QPushButton(tr("Upload To Unit number one"));
and once I have clicked this button, I would like the button label to be changed to something like
"Upload To Unit number two"
I know I can use something like:
uploadButton->setText("upload to unit number two");
But when I put this in a slot that is activated by the signal emitted by the uploadButton, my application just quits,
I think maybe I have to declare the uploadButton as a "Global" widget( if you know what I mean), but I'm not sure how to do this..
Any advice appreciated, Thanks