PDA

View Full Version : Printing Label Based on a Condition



premroxx
13th May 2012, 10:00
I Read data from file & activate labels based on the data. For example if data is (s1, 1). I want to set the value of label s1 to 1. i tried using regular Qstring variable but that didnt work(ui->Variable_s->setText("1")). How do i implement this?

AlexSudnik
13th May 2012, 17:39
Not sure what "ui->Variable_s->setText("1")" means but...void QLabel::setText ( const QString & ) works just fine. It's actually hard to say what's wrong with your code withought seeing it. Can you share a relevant code part(s) ?