View Single Post
Old 06-02-2025, 10:10 AM   #47
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,157
Karma: 211348980
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I just figured it out. I'm not entirely sure my trick is doing anything at this point. It may have at one point... but who knows.

The trick is to not use native file dialogs.

Code:
options = QFileDialog.Options()
options |= QFileDialog.DontUseNativeDialog
fpath, _ = QFileDialog.getOpenFileName(
    w,
    "Select LanguageTool Java file",
    "",
    "languagetool-commandline.jar (*.jar)",
    options=options
)
Unfortunately, that also means the dialog won't automatically match the system theme. So if you want that, you'd need to pull in the match_dark_palette portions of plugin_utils ayway.

Hope something there helps.
DiapDealer is online now   Reply With Quote