Results 1 to 4 of 4

Thread: QListWidget Signal Question

  1. #1
    Join Date
    Sep 2011
    Posts
    21
    Qt products
    Platforms
    Unix/X11 Windows

    Default QListWidget Signal Question

    Here is another "Signals" question from a VB-6 Newbie to pyQT and QT...

    What does the reference to (QListWidgetItem *)

    in void itemDoubleClicked (QListWidgetItem *)

    refer to and how do I use it.

    Thanks!

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QListWidget Signal Question

    Here is the documentation page.
    //i don't know how the python works(how the signal definition looks in python port), but in C++ that is a pointer to the item that was double-clicked.

  3. #3
    Join Date
    Sep 2011
    Posts
    21
    Qt products
    Platforms
    Unix/X11 Windows

    Default Re: QListWidget Signal Question

    OK, I can understand the Pointer. My question is, is where do you get, or how do you construct that pointer.

    In other words, what would I be pointing to?

    What QList property name would be used?

  4. #4
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QListWidget Signal Question

    You don't construct it, you get it from the signal - it's a built-in signal that passes a pointer to the item from the QListWidget that was double-clicked.

    To that signal you connect a slot - like void doStuffForDoubleClickedItem(QListWidgetItem *item) {//use the item here}

Similar Threads

  1. No such signal QListWidget::itemClicked
    By ouekah in forum Newbie
    Replies: 1
    Last Post: 22nd February 2010, 14:48
  2. QListWidget SIGNAL Problem
    By skuda in forum Qt Programming
    Replies: 19
    Last Post: 28th October 2009, 14:42
  3. QListWidget signal problem
    By rishid in forum Qt Programming
    Replies: 6
    Last Post: 18th January 2008, 20:43
  4. QListWidget clicked signal
    By asieriko in forum Qt Programming
    Replies: 12
    Last Post: 10th August 2007, 15:37
  5. question regarding qlistwidget
    By amulya in forum Qt Programming
    Replies: 1
    Last Post: 6th October 2006, 07:17

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.