Results 1 to 4 of 4

Thread: Problems with selection models & views

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2009
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problems with selection models & views

    I think I'm over complicating this... I think I am just going to subclass QStandardItem and QGraphicsPixmapItem and have have private pointers to the corresponding item.

    But the issue with setting the data (using setData() ) on the QStandardItem and getting the unexpected internal drag&drop behaviour... Any ideas?

  2. #2
    Join Date
    Feb 2009
    Posts
    11
    Qt products
    Platforms
    Unix/X11 Windows
    Thanks
    4

    Default Re: Problems with selection models & views

    I think you should subclass QGraphicsItem and emit a signal in mousePressEvent() with the graphics item's unique id as the argument of the signal.

  3. #3
    Join Date
    May 2009
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problems with selection models & views

    nimaweb: Thanks, that's an interesting idea. I'll see if I can work up a signal/slot solution...

Similar Threads

  1. QSqlTableModel and QTableView selection problems
    By innerhippy in forum Qt Programming
    Replies: 5
    Last Post: 19th December 2008, 05:48
  2. Models, delegates or views and how?
    By maddogg in forum Newbie
    Replies: 3
    Last Post: 9th November 2007, 13:59

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.