Ask Your Question
1

"Open in External Viewer"

asked 2019-09-04 07:11:56 -0500

Michael gravatar image

updated 2019-09-04 07:56:26 -0500

Is it possible to configure the mouses (double-)click event so, that it can favour an external viewer? I have some .ui files in my project, and while I can open these - once in the context menu - with the keyboard shortcut in Qt Designer, I would prefer to do so immediately (and even better reuse an already opened designer, but this is optional).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-09-04 12:21:13 -0500

There's no way to do this now. The only option is to bind the command open-ext-selected-from-project to a key binding using the User Interface > Keyboard > Custom Key Bindings preference and then use that. Or add a toolbar item for this command (right-click on the toolbar to configure it).

You can set the command line to use for opening something externally by mime type from the Files > External Display > File Display Commands preference, which may allow you to set things up to reuse an existing designer if the command line they provide supports that. The mime type is what Python's mimetypes module guesses for the extension:

  import mimetypes
  print(mimetypes.guess_type('x.png'))

Or perhaps easier is to use a mime type of * in the preference and write an opener script that does the right thing based on what the file is.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-09-04 07:11:56 -0500

Seen: 200 times

Last updated: Sep 04