Results 1 to 2 of 2

Thread: Problem with Drag And Drop in QMainWindow - children block it.

  1. #1
    Join Date
    Nov 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Exclamation Problem with Drag And Drop in QMainWindow - children block it.

    Hello.

    I have a frustrating problem which I can't solve, could you please help me.

    I have my main window class, subclassed from QMainWindow and central widget with lots of children. I'm trying to realize drag'n'drop functionality. In the main class I overrided QMainWindow::dragMoveEvent, QMainWindow::dragEnterEvent, QMainWindow::dropEvent functions. Also I called the method QMainWindow::setAcceptDrops( true ) in main window's constructor and QWidget::setAcceptDrops( false ) for central widget and each child of it. But I can get d'n'd functionality on the whole window - only on the window title and bounds. When I removed central widget - i got the right behavior. What have I done wrong?

    Thank you for any suggestions.

  2. #2
    Join Date
    Nov 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem with Drag And Drop in QMainWindow - children block it.

    Ok, I made search through internet and found this post. So I decided to solve my problem using eventFilter's of central widget it the main window and all child widgets.

Similar Threads

  1. Replies: 2
    Last Post: 25th June 2012, 20:14
  2. Replies: 1
    Last Post: 13th October 2011, 15:59
  3. problem about drag and drop tip
    By Raul in forum Qt Programming
    Replies: 2
    Last Post: 16th September 2011, 10:52
  4. Drag n Drop problem
    By ScoOteR in forum Qt Programming
    Replies: 1
    Last Post: 21st March 2007, 11:52
  5. Drag 'n Drop problem
    By kiker99 in forum Qt Programming
    Replies: 4
    Last Post: 16th January 2006, 17:35

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.