View Issue Details

IDProjectCategoryView StatusLast Update
0026759LazarusWidgetsetpublic2014-09-28 09:49
ReporterJuha ManninenAssigned ToZeljan Rikalo 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3 (SVN)Product Build 
Target Version1.2.6Fixed in Version1.2.6 
Summary0026759: Drag'n'drop is broken with QT bindings
DescriptionSee the new Designer menu editor drag'n'drop feature as an example. It works very well with GTK2 but not with QT.
TagsNo tags attached.
Fixed in Revision46308
LazTarget1.2.6
WidgetsetQT
Attached Files

Relationships

related to 0017557 assignedZeljan Rikalo QT: Auto-Drag: docking fails 
related to 0008733 closedJuha Manninen Moving menu items in the Menu Editor 
related to 0022943 resolvedZeljan Rikalo Menu Editor Issue with QT widget set on Windows 
related to 0021797 new Drag and Drop broken 
related to 0026795 closedZeljan Rikalo Menu Designer patch for assorted issues 

Activities

Zeljan Rikalo

2014-09-22 09:26

developer   ~0077515

Please attach example which reproduces problem. It's pretty hard to fix such things when IDE need to be rebuilded each time.

Juha Manninen

2014-09-22 16:29

developer   ~0077535

Maybe Mike wants to make a small example application?
Otherwise I will do it but not yet, I have other things going on for a while.

There are 2 standard Delphi compatible ways to start drag'n'drop:
Automatic and manual (by code). IIRC the automatic way does not work in LCL-Windows either although it is an important Delphi compatibility feature.
I will look at it later, too...

Mike Thompson

2014-09-22 16:42

developer   ~0077541

I plan on uploading a test project later today - need to get QT installed first..

Mike Thompson

2014-09-23 00:05

developer   ~0077550

Last edited: 2014-09-23 00:58

View 4 revisions

In a simple test project, using code swiped from the Menu Designer - and with identical controls, I cannot reproduce any of the drag/drop issues observed in the menu designer. In the test project QT & win32 are behaving identically for TPanel/TLabel/TArrow. Something else is going on in the Menu Designer under QT. I'm on it...

Mike Thompson

2014-09-23 00:56

developer  

DragDrop under QT.zip (3,167 bytes)

Mike Thompson

2014-09-23 00:58

developer   ~0077552

Last edited: 2014-09-23 00:59

View 3 revisions

See message in the Menu Drag/Drop issue (http://bugs.freepascal.org/view.php?id=8733). I know what's going on and I'm unsure which way to proceed.

Also see attached project. The problem reproduces when you try to drag Panel1. All controls are hooked to the same OnMouseDown. In there, I'm now setting Sender.Visible := False; Sender.Visible := True; then BeginDrag... It's that Toggle Visibility that's causing the issue (but only for TPanel), without that Visibility Toggle all is well.

Zeljan Rikalo

2014-09-24 09:56

developer   ~0077582

Please test and close if ok.

Mike Thompson

2014-09-24 12:47

developer   ~0077589

Last edited: 2014-09-24 12:51

View 4 revisions

When I try to drag the problematic Panel1, the drag operation is started, then immediately stopped.
I've modified the output of the test project (see "DragDrop under QT (more verbose output).zip") and the following sequence now occurs when I mouse down on Panel1:
  Panel1: OnMouseDown
  Panel1: Visible := False
  Panel1: Visible := True
  Panel1: BeginDrag(False, 1)
  Panel1: OnStartDrag
  Panel1: OnEndDrag

(Looking at your changes I then tried calling the BeginDrag *before* toggling the panel visibility, but no change in results)

All other controls behaved as per before - that is, normally.

Mike Thompson

2014-09-24 12:49

developer  

DragDrop under QT (more verbose output).zip (3,413 bytes)

Zeljan Rikalo

2014-09-24 17:37

developer   ~0077594

I don't understand your last note. Issue is fixed or not ?

Mike Thompson

2014-09-24 19:16

developer   ~0077605

Sorry, yes I did miss that vital bit of information :-(

Original issue has been resolved, but a new one has replaced it. The following sequence now fails to start a drag operation:

Procedure TForm1.Panel1OnMouseDown(...)
Begin
  Panel1.Visible := False;
  Panel1.Visible := True;
  Panel1.BeginDrag(False, 1);
End;

(Panel1 issues an OnEndDrag immediately after the OnStartDrag, all this before I lift the mouse button up)

Zeljan Rikalo

2014-09-27 15:46

developer   ~0077738

Then open new issue for widgetsets or LCL which have such problem.

Mike Thompson

2014-09-27 16:06

developer   ~0077739

Now I have more information, I agree that starting again with a more coherent Mantis item makes sense.

Happy for this issue to be closed, and I will open a new issue shortly.

Juha Manninen

2014-09-27 20:37

developer   ~0077755

Closing ...

Issue History

Date Modified Username Field Change
2014-09-21 23:57 Juha Manninen New Issue
2014-09-21 23:57 Juha Manninen Status new => assigned
2014-09-21 23:57 Juha Manninen Assigned To => Zeljan Rikalo
2014-09-21 23:57 Juha Manninen Relationship added related to 0017557
2014-09-21 23:58 Juha Manninen Relationship added related to 0008733
2014-09-22 08:12 Zeljan Rikalo Relationship added related to 0022943
2014-09-22 09:26 Zeljan Rikalo Note Added: 0077515
2014-09-22 09:26 Zeljan Rikalo Status assigned => feedback
2014-09-22 16:29 Juha Manninen Note Added: 0077535
2014-09-22 16:29 Juha Manninen Status feedback => assigned
2014-09-22 16:42 Mike Thompson Note Added: 0077541
2014-09-23 00:05 Mike Thompson Note Added: 0077550
2014-09-23 00:34 Mike Thompson Note Edited: 0077550 View Revisions
2014-09-23 00:47 Mike Thompson Note Edited: 0077550 View Revisions
2014-09-23 00:56 Mike Thompson File Added: DragDrop under QT.zip
2014-09-23 00:58 Mike Thompson Note Edited: 0077550 View Revisions
2014-09-23 00:58 Mike Thompson Note Added: 0077552
2014-09-23 00:59 Mike Thompson Note Edited: 0077552 View Revisions
2014-09-23 00:59 Mike Thompson Note Edited: 0077552 View Revisions
2014-09-24 09:56 Zeljan Rikalo Fixed in Revision => 46308
2014-09-24 09:56 Zeljan Rikalo LazTarget - => 1.2.6
2014-09-24 09:56 Zeljan Rikalo Note Added: 0077582
2014-09-24 09:56 Zeljan Rikalo Status assigned => resolved
2014-09-24 09:56 Zeljan Rikalo Fixed in Version => 1.2.6
2014-09-24 09:56 Zeljan Rikalo Resolution open => fixed
2014-09-24 09:56 Zeljan Rikalo Target Version 1.4 => 1.2.6
2014-09-24 12:47 Mike Thompson Note Added: 0077589
2014-09-24 12:48 Mike Thompson Note Edited: 0077589 View Revisions
2014-09-24 12:49 Mike Thompson File Added: DragDrop under QT (more verbose output).zip
2014-09-24 12:50 Mike Thompson Note Edited: 0077589 View Revisions
2014-09-24 12:51 Mike Thompson Note Edited: 0077589 View Revisions
2014-09-24 17:37 Zeljan Rikalo Note Added: 0077594
2014-09-24 19:16 Mike Thompson Note Added: 0077605
2014-09-26 08:29 Juha Manninen Relationship added related to 0021797
2014-09-27 15:46 Zeljan Rikalo Note Added: 0077738
2014-09-27 16:06 Mike Thompson Note Added: 0077739
2014-09-27 20:37 Juha Manninen Note Added: 0077755
2014-09-27 20:37 Juha Manninen Status resolved => closed
2014-09-28 09:49 Juha Manninen Relationship added related to 0026795