Results 1 to 6 of 6

Thread: Implementing drag and drop for existing widget

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Implementing drag and drop for existing widget

    I don't have the possibility to test atm, but it is very likely that if you setAcceptDrops(true); then QLineEdit should accept them and display anything that is reasonably convertible to QString.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  2. #2
    Join Date
    Jul 2009
    Posts
    41
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Implementing drag and drop for existing widget

    That may be but how is the application notified that a drop has happened? I don't want to poll the widget.

  3. #3
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Implementing drag and drop for existing widget

    Look for the textChanged(), textEdited() and editingFinished() signals that QLineEdit has.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

Similar Threads

  1. Replies: 0
    Last Post: 2nd June 2010, 17:52
  2. Drag and drop inside and outside a Widget
    By utopia500 in forum Qt Programming
    Replies: 1
    Last Post: 4th May 2010, 16:20
  3. Drag and drop inside and outside a Widget
    By utopia500 in forum Qt Programming
    Replies: 0
    Last Post: 3rd May 2010, 13:42
  4. Drag and Drop a widget in and out QTabWidget
    By smarinr in forum Qt Programming
    Replies: 1
    Last Post: 11th December 2008, 19:10
  5. Replies: 1
    Last Post: 18th November 2008, 06:57

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.