How do I update value of a QLabelElement? #454

Closed
amirrajan opened this Issue Apr 4, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@amirrajan

I've initialized a QLabelElement, and then later want to update its value. However explicitly setting the .value property on the instance of QLabelElement doesn't update its value. I saw an existing issue mentioning the reloadData method on QuickDialogTableView, but my class inherits from QuickDialogController which doesn't contain the reloadData method.

@implementation MyController
{
    QLabelElement *_theLabel;
}

- (id)init
{
    self = [super init];
    QRootElement *root = [[QRootElement alloc] init];
    QSection *section = [[QSection alloc] init];
    _theLabel = [[QLabelElement alloc] initWithTitle:@"The Label" Value:@""];
    QSection *sectionButton = [[QSection alloc] init];
    QButtonElement *sayHello = [[QButtonElement alloc] initWithTitle:@"Say Hello"];

    [sections and controls added to root, etc]
  
    sayHello.onSelected = ^{
        _theLabel.value = "Hello has been said"; //<-- this isn't working
    };
    
    //setting _theLabel.value = "Hello has been said" here works, but not in the delegate

    self.root = root;
    
    return self;
}
@amirrajan

This comment has been minimized.

Show comment Hide comment
@amirrajan

amirrajan Apr 4, 2013

Asked the same question on StackOverflow if that's a better place for this kind of conversation: http://stackoverflow.com/questions/15819102/how-do-i-update-value-of-a-qlabelelement

Asked the same question on StackOverflow if that's a better place for this kind of conversation: http://stackoverflow.com/questions/15819102/how-do-i-update-value-of-a-qlabelelement

@amirrajan amirrajan closed this May 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment