INNER CODE UNIT · Python

_set_window_icon

cunarist/solie · package/solie/window/main.py:187

    async def _set_window_icon(self) -> None:
        """Load and set the window icon."""
        filepath = PACKAGE_PATH / "static" / "product_icon.png"
        async with aiofiles.open(filepath, mode="rb") as file:
            product_icon_data = await file.read()
        product_icon_pixmap = QPixmap()
        product_icon_pixmap.loadFromData(product_icon_data)
        self.setWindowIcon(product_icon_pixmap)

    async def _ensure_internet_connection(self) -> None:
        """Wait for internet connection to be established."""
        await start_monitoring_internet()
        while not internet_connected():
            await ask(
                "No internet connection",
                "Internet connection is necessary for Solie to start up.",
                ["Retry"],
            )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…