Results 1 to 2 of 2

Thread: (Solved) QLCDNumber simple problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2010
    Posts
    107
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default (Solved) QLCDNumber simple problem

    I have a widget with a QLCDNumber that I can't get to display anything. The form was created using Creator and in the constructor for the form, I want to initialize the number. I have read throught the forum and documentation and it should work...not sure why. From what I read, I think that QLCDNumber can take a double or string value. I tried several variations just to get it to work and none of them worked.

    here is the code
    Qt Code:
    1. Timer::Timer(QWidget *parent) :
    2. QWidget(parent),
    3. ui(new Ui::Timer)
    4. {
    5. ui->setupUi(this);
    6. ui->lcdDisplay->display(2345);
    7. //ui->lcdDisplay->display("2345");
    8. //ui->lcdDisplay->display(1234.5);
    9. }
    To copy to clipboard, switch view to plain text mode 
    I was looking at this too long...I had a function call later on in the code for initializing everything and it set the number to 0...
    Last edited by poporacer; 7th January 2011 at 06:03.

Similar Threads

  1. QLCDNumber problem
    By ale301168 in forum Newbie
    Replies: 1
    Last Post: 11th November 2009, 21:16
  2. QLCDNumber display
    By jhearon in forum Qt Programming
    Replies: 0
    Last Post: 26th October 2008, 23:53
  3. QLCDNumber justify
    By davisjamesf in forum Qt Programming
    Replies: 1
    Last Post: 5th July 2007, 10:02
  4. Backgroundcolor QLCDNumber in Windows?
    By Teuniz in forum Qt Programming
    Replies: 4
    Last Post: 30th August 2006, 15:09
  5. QLabel and QLCDNumber
    By mickey in forum Newbie
    Replies: 5
    Last Post: 17th March 2006, 08:12

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.