Results 1 to 6 of 6

Thread: drag and drop

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanked 42 Times in 37 Posts

    Default Re: drag and drop

    Quote Originally Posted by mickey
    hi, I need to implement drag and drop between to QLabel. I need if this is possible...thanks
    Qt Code:
    1. myLabel::myLabel (QString s, QWidget* parent, const char* name) : QLabel (parent,name)
    2. {
    3. setAcceptDrops(TRUE);
    4. }
    To copy to clipboard, switch view to plain text mode 
    If you use two QLineEdits, you will get the drag and drop for free. You can change their colors to look like labels if necessary.
    Save yourself some pain. Learn C++ before learning Qt.

  2. #2
    Join Date
    Jan 2006
    Location
    Cambridge, MA
    Posts
    32
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 7 Times in 6 Posts

    Default Re: drag and drop

    Unless said QLabel is displaying a QPixmap or QMovie....

    --Justin

  3. #3
    Join Date
    May 2006
    Location
    Australia
    Posts
    53
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    11
    Thanked 4 Times in 4 Posts

    Default Re: drag and drop

    there are pretty good examples for drag and drop in the docs

    http://doc.trolltech.com/3.3/dnd.html

    qt/examples/dragdrop
    perfection is an illusion which is stopping me from starting now and finishing on time

Similar Threads

  1. Drag & drop with model/view (Qt4)
    By yogeshm02 in forum Qt Programming
    Replies: 16
    Last Post: 19th September 2011, 20:36
  2. Drag and drop outside the application
    By jpn in forum Newbie
    Replies: 7
    Last Post: 27th August 2006, 15:37
  3. drag and drop
    By vijay anandh in forum Qt Programming
    Replies: 1
    Last Post: 11th April 2006, 11:23
  4. Drag and Drop (drop example)
    By din9 in forum Qt Programming
    Replies: 1
    Last Post: 23rd January 2006, 18:03
  5. Drag 'n Drop problem
    By kiker99 in forum Qt Programming
    Replies: 4
    Last Post: 16th January 2006, 16:35

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.