Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QListwidget item with mousedoubleclicked
Forum Updated to NodeBB v4.3 + New Features

QListwidget item with mousedoubleclicked

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ahmed kato
    wrote on last edited by
    #1

    i am using a QListWidget and I have some text in it...i need to know how to make the user double click any item on the list so that i get its index..thx in advance

    Ahmed Kato
    Computer & communications student
    Intern and MSP at Microsoft

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mindomobile
      wrote on last edited by
      #2

      Hi

      If you want to receive double click event to process you should try to use doubleClicked(QModelIndex) signal and then process it in your custom slot.

      I'm not sure if that's what you looking for, so in case you want to assign int number to the list item you can do it by setting role Qt::UserRole+1 with value using setData( int role, const QVariant & value) method and then retrieve it when processing the signal.

      Hope that helps

      Cheers

      Mobile application development | <a href="http://mindomobile.com">mindomobile.com</a>

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved