switch from PyQt6 to PySide6
PySide6 uses LGPL instead of GPL, which is much nicer to work with.
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import os
|
||||
from typing import Callable
|
||||
from pathlib import Path
|
||||
from PyQt6.QtGui import QAction, QIcon
|
||||
from PyQt6.QtWidgets import QMenu, QFileDialog
|
||||
from PySide6.QtWidgets import QFileDialog
|
||||
|
||||
from raven.pluginbase import PluginBase
|
||||
from raven.pluginregistry import PluginRegistry
|
||||
@@ -47,8 +46,9 @@ class OpenFilePlugin(PluginBase):
|
||||
dialog = QFileDialog()
|
||||
(selected_file, _filter) = dialog.getOpenFileName(
|
||||
caption=self.tr("Open File"),
|
||||
directory=directory
|
||||
dir=directory
|
||||
)
|
||||
# directory=directory
|
||||
if selected_file:
|
||||
self.open_file(selected_file)
|
||||
|
||||
@@ -71,7 +71,7 @@ class OpenFilePlugin(PluginBase):
|
||||
files = self._get_recent_files()
|
||||
for file in files:
|
||||
action = RAction(os.path.basename(file))
|
||||
action.set_action(lambda x, f=file: self.open_file(f))
|
||||
action.set_action(lambda _="", f=file: self.open_file(f))
|
||||
self._menu_recent_files.add_action(action)
|
||||
|
||||
def _remember_recent_file(self, file: str):
|
||||
|
||||
Reference in New Issue
Block a user