Results 1 to 7 of 7

Thread: High light do not upate?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Question High light do not upate?

    Hi All,
    I whan to high light the current item of listview. But the highlight bar do not update when I click , it always say at top of list.
    It seems that current item never updated when mouse clicked! If I update currentItemIndex manually, the hightlight bar can move. What's wrong with it?
    Qt Code:
    1. Rectangle {
    2. width: 180; height: 200
    3. ListModel {
    4. id: contactModel
    5. ListElement {
    6. name: "Bill Smith"
    7. number: "555 3264"
    8. }
    9. ListElement {
    10. name: "John Brown"
    11. number: "555 8426"
    12. }
    13. ListElement {
    14. name: "Sam Wise"
    15. number: "555 0473"
    16. }
    17. }
    18. Component {
    19. id: contactDelegate
    20. Item {
    21. width: 180; height: 40
    22. Column {
    23. Text { text: '<b>Name:</b> ' + name }
    24. Text { text: '<b>Number:</b> ' + number }
    25. }
    26. }
    27. }
    28.  
    29. ListView {
    30. anchors.fill: parent
    31. model: contactModel
    32. delegate: contactDelegate
    33. highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
    34. focus: true
    35. }
    36. }
    To copy to clipboard, switch view to plain text mode 
    Attached Files Attached Files

Similar Threads

  1. High DPI support on windows
    By Daylight in forum Qt Tools
    Replies: 1
    Last Post: 17th March 2014, 19:20
  2. high resolution timer
    By ChasW in forum Qt Programming
    Replies: 18
    Last Post: 24th June 2011, 18:50
  3. High CPU Utilization
    By navi1084 in forum Qt Programming
    Replies: 4
    Last Post: 10th July 2009, 09:37
  4. qt4 with light blinking on device
    By khcbabu in forum Qt Programming
    Replies: 1
    Last Post: 9th March 2009, 15:52
  5. Light items for the graphicsView
    By maverick_pol in forum Qt Programming
    Replies: 12
    Last Post: 1st November 2007, 18:51

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.