Results 1 to 9 of 9

Thread: How to write coding for the selected item in the QListWidget?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2011
    Posts
    45
    Qt products
    Qt4
    Platforms
    Symbian S60

    Post Re: How to write coding for the selected item in the QListWidget?

    Thank you Chris it got worked..

    Thank you once again.

    Now i am trying to display different messages in a QMessageBox when selecting each item.

    Suppose if select "A" it should display A for APPLE and if "B" is selected it displays B for BANANA...

    How to add this property in this?
    Last edited by harish; 25th December 2011 at 07:05.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: How to write coding for the selected item in the QListWidget?

    The clicked item is passed in to the slot. You can look at which item it is and make decision about what to display.

  3. #3
    Join Date
    Nov 2011
    Posts
    45
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: How to write coding for the selected item in the QListWidget?

    Ok thank you chris..

    Thank you for your guidance and help.

  4. #4
    Join Date
    Apr 2013
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to write coding for the selected item in the QListWidget?

    Hi, Am a newbie to qt and require some guidance from you guys.
    How to place the selected item to center in a qlistwidget ?.
    Assume that there are 10 items in a qlistwidget and only 5 index values are visible at a time. If I select the fourth index value or item, how could i scroll the selected item to the 2nd index and view the next items from the fourth index.

    Is there any way to do this?

    Thanks ...

Similar Threads

  1. popupmenu for QTreeWidget's item when a particular item selected.
    By vinod sharma in forum Best Practices in Qt Programming
    Replies: 1
    Last Post: 22nd January 2010, 10:45
  2. Replies: 1
    Last Post: 20th January 2010, 08:38
  3. Replies: 2
    Last Post: 11th January 2010, 23:15
  4. QListWidgetItem remove an item
    By mattia in forum Newbie
    Replies: 4
    Last Post: 9th November 2007, 07:57
  5. Remove selected QListWidgetItem
    By xgoan in forum Newbie
    Replies: 7
    Last Post: 28th September 2006, 14:42

Tags for this Thread

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.