Results 1 to 3 of 3

Thread: Simulated ShiftModifier

  1. #1
    Join Date
    Jun 2007
    Posts
    56
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Simulated ShiftModifier

    I there a convenient way to set/unset the ShiftModifier such that the modifiers() method of QKeyEvent will return something set programmatically instead of what the keyboard says?

    I am using a touch screen as the only interface to my application and I wish to use drag and drop to "move" a file rather than copy it. The only way I can see to do that is to press the shift key when dropping stuff. Since I don't have a keyboard, I'm looking for a way to simulate that by using a move/copy radio button to set the shift modifier.

    Any clues would be appreciated.

    -Mic

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Simulated ShiftModifier

    I'm assuming you're using model view. Have you tried QAbstractItemModel::setSupportedDragActions(Qt::MoveAction)?
    J-P Nurmi

  3. #3
    Join Date
    Jun 2007
    Posts
    56
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Simulated ShiftModifier

    Quote Originally Posted by jpn View Post
    I'm assuming you're using model view. Have you tried QAbstractItemModel::setSupportedDragActions(Qt::MoveAction)?
    Um...no?

    I am amazed at how long I have stared at that documentation and never saw that method! Thank you jpn! I've implemented it now and it is working like I need it to. Wooo Hoooo!

    -Mic

Similar Threads

  1. Replies: 1
    Last Post: 1st February 2008, 18:55

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.