Results 1 to 3 of 3

Thread: Qlabel indication

  1. #1
    Join Date
    Mar 2011
    Posts
    35
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default Qlabel indication

    Is it possible to....provide....X-coordinate value to qlabel from lineedit and show the position in Qlabel(just to indicate)

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qlabel indication

    I'm not sure what you want as this seems to be a trivial question. Is the following not what you expect?
    Qt Code:
    1. label->setText(lineEdit->text());
    To copy to clipboard, switch view to plain text mode 

    Optionally you can connect the textChanged() signal from the line edit to label's setText() slot.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qlabel indication

    hi,

    I'm not sure what you are asking, but if you simply want to show the line edit x position try ,
    Qt Code:
    1. showLabel->setText(QString::number(urLineEdit->x()));
    To copy to clipboard, switch view to plain text mode 

    hope it helps,
    bala

Similar Threads

  1. Replies: 1
    Last Post: 29th September 2009, 19:44
  2. QLabel bug??? Please help
    By jwieland in forum Qt Programming
    Replies: 3
    Last Post: 3rd April 2009, 20:04
  3. Replies: 1
    Last Post: 2nd August 2008, 15:46
  4. Qlabel
    By dragon in forum Qt Programming
    Replies: 10
    Last Post: 7th August 2007, 16:46
  5. QLabel
    By xapek in forum Qt Programming
    Replies: 1
    Last Post: 19th January 2007, 10:27

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.