Results 1 to 2 of 2

Thread: Printing Label Based on a Condition

  1. #1
    Join Date
    Aug 2011
    Posts
    42
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    10

    Default Printing Label Based on a Condition

    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?

  2. #2
    Join Date
    Dec 2010
    Location
    Russia
    Posts
    83
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1
    Thanked 12 Times in 11 Posts

    Default Re: Printing Label Based on a Condition

    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) ?

Similar Threads

  1. Using an If condition in a QML delegate?
    By technoViking in forum Qt Quick
    Replies: 8
    Last Post: 25th August 2011, 05:26
  2. how to set wait condition
    By hema in forum Newbie
    Replies: 5
    Last Post: 25th July 2011, 08:08
  3. don`t work Condition...
    By Resager in forum Newbie
    Replies: 1
    Last Post: 6th May 2011, 18:18
  4. Replies: 0
    Last Post: 31st July 2010, 17:27
  5. Sleep condition in QT
    By santhoshv84 in forum Qt Programming
    Replies: 1
    Last Post: 18th July 2008, 12:07

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.