[Interest] Problems with Drag and Drop in Windows 7

norulez at me.com norulez at me.com
Fri Feb 3 22:30:50 CET 2012


Ok, I found the problem...

Under Windows 7 the qt creator was configured to start/run as administrator.
After I removed this property it works like expected.

The Problem seems to be that the qt creator was running as administrator and the files were dragged with the current logged on user.

Thanks to all

Best Regards

Am 25.01.2012 um 17:11 schrieb "Samuel Gaist" <samuel.gaist at edeltech.ch>:

> In my case they are reached. Are you building your application in debug or
> release mode ?
> 
> In release mode, it won't break. Furthermore a line like int n = 0; is
> likely to get optimized out.
> 
> If you want to have the correct behavior, do as said in the documentation
> with the acceptProposedAction()
> 
> 
> On 25 janv. 2012, at 16:56, norulez at me.com wrote:
> 
>> But the main problem is that the breakpoint in the functions aren't
> reached.
>> 
>> Make a breakpoint on a line (int n = 0;) in the code and run in debug
> mode
>> 
>> Am 25.01.2012 um 16:48 schrieb Samuel Gaist <samuel.gaist at edeltech.ch>:
>> 
>>> 
>>> On 25 janv. 2012, at 15:44, NoRulez wrote:
>>> 
>>>> Hello again,
>>>> 
>>>> I've attached a small and simple example, which doesn't work.
>>>> 
>>>> Maybe someone could help
>>>> 
>>>> Thanks in advance
>>>> Best Regards
>>>> 
>>>> <DragDropExample.rar>_______________________________________________
>>>> Interest mailing list
>>>> Interest at qt-project.org
>>>> http://lists.qt-project.org/mailman/listinfo/interest
>>> 
>>> Hello,
>>> 
>>> Tested with mingw 4.4.0 as well as MSVC2008.
>>> 
>>> Indeed, your example won't work as it is. You need to accept the
> proposed action (event->acceptProposedAction()) in dragEnterEvent and
> dragMoveEvent and just accept the event (event->accept()) in
> dragLeaveEvent.
>>> 
>>> In dropEvent, you have to do your stuff and again
> acceptProposedAction().
>>> 
>>> Hope it helps
>>> Samuel
> 
> 



More information about the Interest mailing list