Results 1 to 9 of 9

Thread: Custom selector widget

Threaded View

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

    Default Re: Custom selector widget

    Sure thing, I attached a partial screen of what I have so far. The blue array of rectangles would be the things that are individually selectable. Ideally, I would like to be able to select things from multiple levels (e.g., boxes 1, 2, 3 in level 4-1 and 4-2 and 4-3) and be able to drag just the selected ones, like when you select multiple items in the QTreeView and drag them.

    The model is already set up for the tree, so I'm just providing a different visualization at the lowest level, rather than just have the 32 items in that level lined up vertically. When I click on a rectangle, I want that small rectangle to be selected.

    I used the Qt Star Delegate example as a reference. Basically I just have a rectangle and paint it 32 times. I guess my problem at this point is how to handle dealing with selecting individual boxes, and how to make them draggable. Also based on reading other threads in the forum, I'll probably run into problems later because I don't want to have to double click to trigger the edit event, then click once more to toggle the switch.

    edit: I should probably say everything in the list is selectable and draggable already, and doing that essentially means "select this item, and everything below it in the tree". Every item's flag is Qt::ItemIsDragEnabled.
    Attached Images Attached Images
    Last edited by Strongoloid; 17th July 2009 at 19:22.

Similar Threads

  1. Replies: 12
    Last Post: 5th July 2009, 16:03
  2. Replies: 2
    Last Post: 16th May 2008, 14:39
  3. Custom widget
    By zorro68 in forum Qt Programming
    Replies: 7
    Last Post: 28th January 2008, 14:06
  4. Custom proxy model issue
    By Khal Drogo in forum Qt Programming
    Replies: 13
    Last Post: 30th November 2007, 12:41
  5. custom plug-in widget in another custom plug-in widget.
    By MrGarbage in forum Qt Programming
    Replies: 6
    Last Post: 27th August 2007, 15:38

Tags for this Thread

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.