Qt 4.8.3 broke Drag&Drop (4.8.4 too?), what now ???
Qt v4.8.3 broke Drag&Drop on the Windows platform:
This broke my project. And I assume this is a rather prominent "show stopper" bug for a lot of projects.
So my question: As a fix seems to be on the way already, are we going to see a Qt v4.8.4 (or v4.8.3-2) "emergency" release anytime soon? Otherwise Windows users will be required to revert to Qt 4.8.2 for now - or backport the suggested fix manually. This info would be very helpful for me to plan the next release of my project...
There are no v4.8.4 release plans yet (at least as far as I know).
Sure I can pick only the Drag&Drop fix and apply it to the Qt v4.8.3 sources. Actually that's what I have done for my own tests. But it still means that we can not use the official Qt v4.8.3 DLL's, which is what a lot of (most?) projects do! So - if Qt 4.8.4 won't appear anytime soon - it would be very nice if the "official" Qt v4.8.3 release package (for Windows) could at least be updated with the Drag&Drop fix included. Any chance?
BTW: Where can I download Qt v4.8.2 for Windows (MSVC)? Couldn't find it in the "archive":ftp://ftp.qt.nokia.com/qt/source/.
[quote author="MuldeR" date="1349004902"]But it still means that we can not use the official Qt v4.8.3 DLL's, which is what a lot of (most?) projects do![/quote]
No, we can't, and that's quite a problem.
It is less of an issue on Windows, as usually the Qt libraries are distributed on an application-specific basis. But it still requires you to build your own set of the libraries, which some developers are not familiar with.
I don't see an updated v4.8.3 or v4.8.3-1 happen, but we might see an earlier v4.8.4.
Though this has been fixed, but I just tried Qt 4.8.4 RC4 (official pre-compiled DLL's) and it's still broken :-(
Reverted to v4.8.2 and problem is gone immediately...
I also have a problem with drag & drop in windows. It started with Qt 4.7 up to the latest version.
(So I stopped using drag and drop until it is fixed). The Qt examples only work when it comes to Qt-to-Qt interaction and not with Qt-to-other programs or vice versa (e.g. a file coming from any directories using windows explorer.
Hope the developers can fix this.
Well, Qt 4.8.2 it was still working fine for me (Windows). In Qt 4.8.3 there was a problem with Drag&Drop, but there's a patch available (see above). My own Qt 4.8.3 builds incorporating that patch seem to work fine too. But now I tried Qt 4.8.4 (RC4), which I though includes the patch (!?), but I again get the problem. It's just like the window doesn't accept drop's. I only get a "Stop" sign cursor. Went back to 4.8.2, just to be sure, and problem gone immediately. Too bad, because this is one of the things many of my users complain about...
Strange enough, the 4.8 branch apparently does include the patch:
If it does not work please update the bug report as soon as possible so we don't have it broken again in 4.8.4.
[quote author="Lukas Geyer" date="1354181269"]If it does not work please update the bug report as soon as possible so we don't have it broken again in 4.8.4.[/quote]
Hopefully the dev's will see it there :-)
Here is my application, binary based on Qt 4.8.2 (last one that was good):
Here is my application, binary based on Qt 4.8.4 RC-4 (official DLL's) with broken Drag'n'Drop:
You can check easily that, with Qt 4.8.4 RC-4, the following function never gets called:
void MainWindow::dragEnterEvent(QDragEnterEvent *event)
Hi MuldeR, just to follow up on this, is the patch included in the recently released official 4.8.4?
If not, then I hope a troll can read this and merge it right away, it's odd that already having a patch fixing this, that is being ignored.
Well, as mentioned above, in the 4.8 branch of Qt's repository (on Gitorious), the patch apparently is included. So I assume (hope) the 4.8.4 release does have it too. What confuses me is that with my own "static" builds of Qt 4.8.3 and the same patch included, there was no problem for me. Now with 4.8.4 (official DLL's) I again do have the problem. Maybe something else has changed after 4.8.3 that again causes problems...
Also, this is from the Qt 4.8.4 changelog:
@Qt for Windows
Fix Drag and Drop with Native Widgets [QTBUG-27265]@
Okay, I spent the evening trying to create a minimal example application that reproduces the issue, as was requested in the bugtracker. To my surprise, this time I couldn't get Drag&Drop to work at all - neither with Qt 4.8.4 nor with Qt 4.8.2. Although I had re-implemented dragEnterEvent() it just never got called.
Then I found the reason: I didn't call setAcceptDrops(true) in my example application. After adding that call, Drag&Drop now is working with both, Qt 4.8.2 and Qt 4.8.4. Bummer! Nonetheless in my "actual" application I do not call setAcceptDrops(true) anywhere. I double checked that. I only re-implemented dragEnterEvent(). Adding the missing setAcceptDrops(true) call fixed my "actual" application with Qt 4.8.4 immediately. Doah!
Still I can't understand: How comes it ever worked? And why only with Qt 4.8.2, not with Qt 4.8.4 ???
(Really, I can't find anything in my "actual" application that enables Drag&Drop without calling setAcceptDrops(true) and that would explain why it only works with Qt up to and including 4.8.2, but not 4.8.4. Any ideas or hints?)
Whom it may concern:
I had the same problem with drag and drop working fine under Mac and Linux and with issues under Windows. Only the title bar was sensitive to drops.
The solution was, that I had some global event filters (qApp->installEventFilter(..)) installed, which lacked some pass throughs. I just wonder, why it worked under the other OS.
Tags I searched for: qt windows drop area title bar
Edit: The fixed event filter didn't solve the problem, it reappeared if built in release mode. I had to set all child widgets manually to accept drops. The menu and the toolbar still don't accept drops, but this is not tragic.
Tags I searched for: qt windows release debug drag drop