Le 17/10/2014 16:29, Tobias Boege a écrit : > Hi, > > there is a project attached which tries to implement some drag and drop. The > archive has gb.qt4 as graphical component but let me start with its behaviour > under gb.gui: > > - drag from SourceLabel und SourceTextBox and drop on Destination work, > - if I do three drag and drops: (i) from SourceLabel, (ii) from > SourceTextBox, (iii) from SourceLabel again, I get an error "Undergoing > drag". At step (ii) I see a warning in the console: > > (DragData:2084): GLib-GObject-WARNING **: gsignal.c:2580: instance > '0x14170a0' has no handler with id '138' > > When I change the component to gb.qt4, I get the following: > > - drag from SourceTextBox does not work automatically anymore, I have to > code it myself (losing the ability to select text in it), > - no errors or warnings. > > The project is from another Gambas user and on his system (don't know what > it is -- does it matter?), the project with gb.gui does: > > - drag from SourceTextBox works automatically, drag from SourceLabel > doesn't work, even when coded (as in the attached project). > > Is there anything I can say to him about this? >
I have started to fix drag and drop in gb.gtk and gb.gtk3. Normally, your example should work as expected both with gb.gtk and gb.gtk3. The fix may have a bad side effect with automatic mouse grabs on button press in gb.gtk3. People will tell me. As for gb.qt4, I don't understand why dnd is not automatic anymore with TextBox. If you replace the TextBox by a TextArea, it works. I noticed that behaviour in some other textboxes (QLineEdit Qt4 widget) in KDE programs, but not all! There is also a bug I couldn't reproduce at will with gb.qt4: If, in your example, I repeatedly and alternatively drag from the Label and from the TextBox, I can make the destination widget disappear and the program crash. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user