Results 1 to 2 of 2

Thread: Listwidgetitem text is chpopped while updating widget

  1. #1
    Join Date
    Oct 2009
    Posts
    105
    Thanked 4 Times in 2 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Listwidgetitem text is chpopped while updating widget

    HI All,

    I've a list widget, and i added a button to listwidget item. Button is uploading, but it is uploading above text. so text is not visible. herewith i've attached the code. please tell me how can i movethe buuton to end. Thank you all.
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2010
    Posts
    34
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Listwidgetitem text is chpopped while updating widget

    It appears that the QListWidget::setItemWidget method does not provide any layout arrangement of the existing text with the added widget.
    From the documentation:

    This function should only be used to display static content in the place of a list widget item. If you want to display custom dynamic content or implement a custom editor widget, use QListView and subclass QItemDelegate instead.

    However, I'd create a simple QWidget derived class which will contain (and arrange in the proper layout) the text (in some QLabel) and the button, and add this widget to the QListWidget.

Similar Threads

  1. Replies: 0
    Last Post: 16th June 2010, 13:09
  2. Tree widget not updating the data
    By phillip_Qt in forum Qt Programming
    Replies: 2
    Last Post: 17th November 2009, 07:00
  3. updating a widget's display
    By jhearon in forum Qt Programming
    Replies: 5
    Last Post: 10th November 2008, 16:59
  4. updating text in QTextEdit [SOLVED]
    By me_here_me in forum Qt Programming
    Replies: 3
    Last Post: 25th September 2007, 15:01
  5. Replies: 11
    Last Post: 7th September 2006, 23:15

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.