Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 06-02-2025, 06:19 AM   #46
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: 28,508
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Ok. Then I guess it's possible that the subclassed QApplication might be necessary to pull this off after all.

If only for my own satisfaction, I may try to come up with a minimally subclassed QApplication that can be easily pasted into a plugin's code for this edge case where only a FileOpen dialog is desired.
DiapDealer is online now   Reply With Quote
Old 06-02-2025, 09: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: 28,508
Karma: 204127028
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
Old 06-02-2025, 01:33 PM   #48
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,705
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
The trick is to not use native file dialogs.
The sample code worked like a charm!
Doitsu is offline   Reply With Quote
Old 06-02-2025, 01:43 PM   #49
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: 28,508
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Great! Happy to help.
DiapDealer is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Feat. Req. Discussion: Adding Markdown Support to KOReader spectas KOReader 1 10-27-2024 07:03 PM
[Metadata Source plugins] Calibre internal plugins fail igorius Plugins 1 05-28-2023 11:42 AM
[Discussion] Update plugins from GitHub release page xxyzz Plugins 6 11-23-2020 04:54 AM
Systemwide installation of plugins / Discovery of installed plugins via pkg_resources t-8ch Development 8 11-14-2020 09:25 AM
No Module name Tkinter on plugin import foghat Plugins 1 11-11-2010 07:11 PM


All times are GMT -4. The time now is 06:49 PM.


MobileRead.com is a privately owned, operated and funded community.