本文整理汇总了Python中PyQt5.QtQuick.QQuickView.setMinimumWidth方法的典型用法代码示例。如果您正苦于以下问题:Python QQuickView.setMinimumWidth方法的具体用法?Python QQuickView.setMinimumWidth怎么用?Python QQuickView.setMinimumWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtQuick.QQuickView
的用法示例。
在下文中一共展示了QQuickView.setMinimumWidth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Application
# 需要导入模块: from PyQt5.QtQuick import QQuickView [as 别名]
# 或者: from PyQt5.QtQuick.QQuickView import setMinimumWidth [as 别名]
class Application(QApplication):
"""Main Nuxeo Drive application controlled by a system tray icon + menu"""
icon = QIcon(str(find_icon("app_icon.svg")))
icons: Dict[str, QIcon] = {}
icon_state = None
use_light_icons = None
filters_dlg: Optional[FiltersDialog] = None
_delegator: Optional["NotificationDelegator"] = None
tray_icon: DriveSystrayIcon
def __init__(self, manager: "Manager", *args: Any) -> None:
super().__init__(list(*args))
self.manager = manager
self.osi = self.manager.osi
self.setWindowIcon(self.icon)
self.setApplicationName(APP_NAME)
self._init_translator()
self.setQuitOnLastWindowClosed(False)
self.ask_for_metrics_approval()
self._conflicts_modals: Dict[str, bool] = dict()
self.current_notification: Optional[Notification] = None
self.default_tooltip = APP_NAME
font = QFont("Helvetica, Arial, sans-serif", 12)
self.setFont(font)
self.ratio = sqrt(QFontMetricsF(font).height() / 12)
self.init_gui()
self.manager.dropEngine.connect(self.dropped_engine)
self.setup_systray()
self.manager.reloadIconsSet.connect(self.load_icons_set)
# Direct Edit
self.manager.direct_edit.directEditConflict.connect(self._direct_edit_conflict)
self.manager.direct_edit.directEditError.connect(self._direct_edit_error)
# Check if actions is required, separate method so it can be overridden
self.init_checks()
# Setup notification center for macOS
if MAC:
self._setup_notification_center()
# Application update
self.manager.updater.appUpdated.connect(self.quit)
self.manager.updater.serverIncompatible.connect(self._server_incompatible)
self.manager.updater.wrongChannel.connect(self._wrong_channel)
# Display release notes on new version
if self.manager.old_version != self.manager.version:
self.show_release_notes(self.manager.version)
# Listen for nxdrive:// sent by a new instance
self.init_nxdrive_listener()
# Connect this slot last so the other slots connected
# to self.aboutToQuit can run beforehand.
self.aboutToQuit.connect(self.manager.stop)
@if_frozen
def add_qml_import_path(self, view: QQuickView) -> None:
"""
Manually set the path to the QML folder to fix errors with unicode paths.
This is needed only on Windows when packaged with Nuitka.
"""
if Options.freezer != "nuitka":
return
qml_dir = Options.res_dir.parent / "PyQt5" / "Qt" / "qml"
log.debug(f"Setting QML import path for {view} to {qml_dir!r}")
view.engine().addImportPath(str(qml_dir))
def init_gui(self) -> None:
self.api = QMLDriveApi(self)
self.conflicts_model = FileModel()
self.errors_model = FileModel()
self.engine_model = EngineModel(self)
self.action_model = ActionModel()
self.file_model = FileModel()
self.ignoreds_model = FileModel()
self.language_model = LanguageModel()
self.add_engines(list(self.manager._engines.values()))
self.engine_model.statusChanged.connect(self.update_status)
self.language_model.addLanguages(Translator.languages())
flags = Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint
if WINDOWS:
self.conflicts_window = QQuickView()
self.add_qml_import_path(self.conflicts_window)
self.conflicts_window.setMinimumWidth(550)
self.conflicts_window.setMinimumHeight(600)
#.........这里部分代码省略.........