You are not logged in.

#1 2025-11-11 11:28:55

tethys
Member
Registered: 2019-08-13
Posts: 168

Drag & drop between qt and gtk applications

I recently was forced to change my file manager from doublecmd-gtk2 to doublecmd-qt6 (gtk2 is no longer in the official repos). I am also using gnome-terminal, which is gtk-based. One feature that I found very useful was selecting multiple files in doublecmd-gtk2 and dragging them in the gnome-terminal where I could process them.

Now, after changing to doublecmd-qt6 this feature no longer works. I can select multiple files and drag them into gnome-terminal but only the first in the selection appears in terminal. So I installed qterminal, which is qt-based. And the dragging of multiple files works again between doublecmd-qt6 and qterminal.

So, is there a way to make this work between doublecmd-qt6 and gnome-terminal? It looks like there is some sort of incompatibility between qt and gtk applications but I am not quite sure if this is indeed the source of the problem.

Offline

#2 2025-11-11 14:06:38

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,632

Re: Drag & drop between qt and gtk applications

Is this X11 or a (which) wayland compositor?
(If wayland, try the behavior on an X11 session and some other wayland compositor to isolate the problem - you could also try to shoehorn xwayland in there because that's what would have happened w/ gtk2 on wayland)

Offline

#3 2025-11-11 14:21:32

tethys
Member
Registered: 2019-08-13
Posts: 168

Re: Drag & drop between qt and gtk applications

Ah, sorry, I forgot to mention: I use xorg + openbox + picom.

Offline

#4 2025-11-11 16:36:29

Valso
Member
Registered: 2021-04-22
Posts: 131

Re: Drag & drop between qt and gtk applications

What you describe in the title was an old problem between qt5 and GTK programs - from at least 5 years ago. I think they fixed it in KDE Plasma 5.27 or 5.28 but it was only a fix for KDE 5. I had reported this problem long ago in the qt5 github but AFAIK the Qt devs never fixed it. You can try report it again but I doubt they'll pay any attention, QT are a little... sect-like - if you don't use qt, you suck. Because of this and other incompatibility problems with qt and GTK, I spent the last 2 years in searching for GTK or CLI tools to replace those with qt. Some, like kolourpaint, are irreplaceable, but others, like MKVToolnix-GUI, I managed to replace with a bash script which works 10 times faster than the GUI program. big_smile
IDK if it's about Xorg vs Wayland, though.
The best advice I can give you is to find GTK3 builds of the programs you use, if such builds are available, or find alternatives that still use GTK3. If Qt didn't fix that in over 5 years, I doubt they'll ever fix it.
You could try and install qt5ct and/or qt6ct in order to bring some "middleman" compatibility between qt and GTK but don't get your hopes up, the chances for that "middleman" to work as you want it are slim to none.


RESIST OS GTK3 (customized Arch), i7-12700F, RTX 3070 Ti 8GB, 64GB DDR5-4800 (OCed to 5200 MHz).

Offline

#5 2025-11-11 16:55:14

tethys
Member
Registered: 2019-08-13
Posts: 168

Re: Drag & drop between qt and gtk applications

Thank you for your reply, Valso. In my (relatively short) time with Linux I always used gtk tools, but now doublecmd does not have a gtk version and I was suspecting that there is some sort of conflict between qt and gtk. I also looked in qt6ct but could not find anything to fix this problem. Fortunately, I found the workaround with the qterminal for now.

Offline

#6 2025-11-11 17:36:22

Valso
Member
Registered: 2021-04-22
Posts: 131

Re: Drag & drop between qt and gtk applications

tethys wrote:

I also looked in qt6ct but could not find anything to fix this problem.

It's not so much about qt6ct options but more about the presence of the program, altough in some cases these options do help. One such case is kolourpaint (I'm keeping it at v24.02.2-1, so that it keeps using qt5-base and not qt6-base) where I'm able to control some aspects of kolourpaint, like the default file selector for it - qt5ct gives the option to force it to use a GTK3 file selector which helps with drag & drop from a GTK3 program (in my case it's PCManFM-GTK3) to kolourpaint. But given what you describe, I think this and other similar cases are... separate, for the lack of a better word.
I used to use doublecmd in the past but that commander has nothing in common with TotalCMD regarding functions, so I abanonded it and started using pcmanfm. It can give you double panel function (F3 key), tabs and so much more. At the very least, the shell integration of doublecmd has always sucked, that's why I abandoned it for the GTK3 build of pcmanfm.

Last edited by Valso (2025-11-11 17:41:19)


RESIST OS GTK3 (customized Arch), i7-12700F, RTX 3070 Ti 8GB, 64GB DDR5-4800 (OCed to 5200 MHz).

Offline

#7 2025-11-11 19:55:52

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,632

Re: Drag & drop between qt and gtk applications

This will hinge on the data type doublecmd puts onto the dnd, https://doc.qt.io/qt-6/dnd.html
Ie. plain text or uris and a combined string or a list of entries.

https://github.com/doublecmd/doublecmd/ … sue%20drop - doublecmd seems to be using its own platform abstraction layer what makes it hard to guess what code even to look at sad

Offline

#8 2025-11-11 21:53:10

Valso
Member
Registered: 2021-04-22
Posts: 131

Re: Drag & drop between qt and gtk applications

seth wrote:

This will hinge on the data type doublecmd puts onto the dnd

I doubt that. The same thing happens if you install Ark (qt archiver, usually available by default in KDE Plasma) and you try to unpack files with it by dragging anything from Ark's window to any GTK program, such as PCManFM - the cursor changes to one with the forbidden sign next to it. Considering this only happens when DnD between qt and GTK programs, I'd say it's qt's fault, not the particular program. This problem doesn't exist with any non-qt program, even when the program is from another desktop - MATE, XFCE, Deepin... anything BUT qt-based desktops.


RESIST OS GTK3 (customized Arch), i7-12700F, RTX 3070 Ti 8GB, 64GB DDR5-4800 (OCed to 5200 MHz).

Offline

#9 2025-11-11 22:24:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,632

Re: Drag & drop between qt and gtk applications

I don't.

the cursor changes to one with the forbidden sign next to it

What means that the destination rejects the dnd data the source offers.
This is not so much a matter of "fault" as of "lack of standard"
That being said, I can happily drag any amount of files from phototonic (Qt6) to gimp (gtk3) to open them - as I can drag them into any old QTextEdit where the paths will show up as URIs

even when the program is from another desktop - MATE, XFCE, Deepin

Mate and Xfce base on gtk, Deepin is a frankenstein creature, but the DE itself doesn't matter - the particular clients does, here it's likely determined by the toolkit (gtk/qt)

Offline

Board footer

Powered by FluxBB