Results 1 to 4 of 4

Thread: QDockWidget: difference between move() and mouse drag

Hybrid View

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

    Default Re: QDockWidget: difference between move() and mouse drag

    I did not explain myself clearly.

    What i do is:
    1) In MyMainWindow::mousePressEvent():
    I get a pointer of a QListWidgetItem. The QListWidget is in a QDockWidget in LeftDockArea.

    2) In MyMainWindow::mouseMoveEvent():
    According to the text of QListWidgetItem pointer, I create a new floating QDockWidget (movable, flotable and dockable to the right area).

    What I would do is:
    3) To move the new floating QDockWidget to attach it in the right dock area without to release mouse button (so during a mouseMoveEvent).

    If I use the QDockWidget::move(QCursor:: pos()) method I can move the new floating QDockWidget but it's not dockable and if I want dock the new QDockWidget I need to release mouse button and to do a click button on QDockWidget title bar... so i can move it and it's dockable.

    Any Idea?
    Tnx.

  2. #2

    Default Re: QDockWidget: difference between move() and mouse drag

    No one knows how to do or can not do?

Similar Threads

  1. Replies: 6
    Last Post: 19th September 2016, 12:44
  2. Replies: 11
    Last Post: 19th September 2013, 23:00
  3. Replies: 3
    Last Post: 22nd February 2013, 20:56
  4. move/drag tabified QDockWidget's togeter
    By qtui in forum Qt Programming
    Replies: 0
    Last Post: 14th February 2011, 01:01
  5. Move Rectangle on mouse Move
    By vermarajeev in forum Qt Programming
    Replies: 24
    Last Post: 14th May 2007, 06:34

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.