Check the dependencies. If it depends on libgtk, it's a gtk app. libQt, is a qt app. There maybe rare other situations (Tk, plain xlib, fltk, etc.)
This will get you 99%, but there are exceptions. I.e. Firefox is linked against GTK, but paints its own widgets with custom theming anyways. Telegram is linked against Qt, but has it's own theming/dark mode too.