Results 1 to 3 of 3

Thread: editable Qlabel

  1. #1
    Join Date
    Jan 2016
    Posts
    3
    Thanks
    2
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default editable Qlabel

    Hi.
    Forget my bad english
    I want to know how can i make a Qlabel editable .
    How to create it in Qdesinger and how can i get qlabel text after editing it
    Thank you all for that effort. .

  2. #2
    Join Date
    Jan 2016
    Posts
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: editable Qlabel

    You can make a flat button and create a line edit widget when clicking it and set the button invisible. Then add the return pressed signal to the line edit so that you can save your text to button.

  3. The following user says thank you to Nirvana for this useful post:

    salahkimo (1st February 2016)

  4. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: editable Qlabel

    Or you derive a new class from QLabel, implement key handling for editing and use "promote widget" in designer to use your label instead of QLabel.

    Cheers,
    _

  5. The following user says thank you to anda_skoa for this useful post:

    salahkimo (1st February 2016)

Similar Threads

  1. Replies: 1
    Last Post: 19th January 2014, 23:29
  2. geting QLabel text ontop of other QLabel displaying image
    By krystosan in forum Qt Programming
    Replies: 1
    Last Post: 15th December 2013, 17:35
  3. Editable Models
    By MTK358 in forum Newbie
    Replies: 1
    Last Post: 9th September 2010, 19:58
  4. Replies: 1
    Last Post: 29th September 2009, 19:44
  5. Replies: 1
    Last Post: 2nd August 2008, 15:46

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.