Results 1 to 2 of 2

Thread: How find QPoint from a QListWidgetItem inside viewport?

  1. #1
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default How find QPoint from a QListWidgetItem inside viewport?

    To QDrag a icon from QListWidgetItem i need to discovery QPoint from Item to set

    setHotSpot

    Qt Code:
    1. QDrag *drag = new QDrag(this);
    2. drag->setMimeData(mimeData);
    3. drag->setPixmap(Io.pix());
    4. drag->setHotSpot(event->pos() - ????? ); //////
    To copy to clipboard, switch view to plain text mode 

    how i find this inside viewport? from one QListWidget to other?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How find QPoint from a QListWidgetItem inside viewport?

    What point are you speaking of? Can't you use anything QAbstractItemView::visualRect() offers?

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.