Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions examples/AdvancedPy/src/AdvancedPy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
from pathlib import Path
import sys

from PySide6.QtGui import QGuiApplication
from PySide6.QtWidgets import QApplication
from PySide6.QtQml import QQmlApplicationEngine, qmlRegisterSingletonType
from PySide6.QtCore import qInstallMessageHandler
from PySide6.QtGui import QIcon

# It is usually assumed that the EasyApp package is already installed in the desired python environment.
# If this is not the case, and if the example is run from the EasyApp repository, one need to add the path to the
Expand All @@ -31,8 +32,9 @@
qmlRegisterSingletonType(Backend, 'Backends', 1, 0, 'PyBackend')
console.debug('Backend class is registered as a singleton type for QML')

app = QGuiApplication(sys.argv)
app = QApplication(sys.argv)
console.debug(f'Qt Application created {app}')
app.setWindowIcon(QIcon(str(CURRENT_DIR / 'Gui' / 'Resources' / 'Logos' / 'App.svg')))

engine = QQmlApplicationEngine()
console.debug(f'QML application engine created {engine}')
Expand Down
4 changes: 2 additions & 2 deletions examples/BasicPy/src/BasicPy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pathlib import Path
import sys

from PySide6.QtGui import QGuiApplication
from PySide6.QtWidgets import QApplication
from PySide6.QtQml import QQmlApplicationEngine

# It is usually assumed that the EasyApp package is already installed in the desired python environment.
Expand All @@ -18,7 +18,7 @@

if __name__ == '__main__':
# Create Qt application
app = QGuiApplication(sys.argv)
app = QApplication(sys.argv)

# Create the QML application engine
engine = QQmlApplicationEngine()
Expand Down
4 changes: 2 additions & 2 deletions examples/IntermediatePy/src/IntermediatePy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pathlib import Path
import sys

from PySide6.QtGui import QGuiApplication
from PySide6.QtWidgets import QApplication
from PySide6.QtQml import QQmlApplicationEngine, qmlRegisterSingletonType

# It is usually assumed that the EasyApp package is already installed in the desired python environment.
Expand All @@ -26,7 +26,7 @@
qmlRegisterSingletonType(Backend, 'Backends', 1, 0, 'PyBackend')

# Create Qt application
app = QGuiApplication(sys.argv)
app = QApplication(sys.argv)

# Create the QML application engine
engine = QQmlApplicationEngine()
Expand Down
2 changes: 1 addition & 1 deletion src/EasyApp/Gui/Style/Fonts.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ QtObject {
property FontLoader nunitoLight: FontLoader { source: fontPath("Nunito", "Nunito-Light.ttf") } // font.weight: Font.Light
property FontLoader nunitoSemiBold: FontLoader { source: fontPath("Nunito", "Nunito-SemiBold.ttf") } // font.weight: Font.DemiBold

property FontLoader fontAwesomeSolid: FontLoader { source: fontPath("FontAwesome", "Font Awesome 5 Free-Solid-900.otf") }
property FontLoader fontAwesomeSolid: FontLoader { source: fontPath("FontAwesome", "Font Awesome 6 Free-Solid-900.otf") }

// Font families
readonly property string fontFamily: ptSansRegular.name
Expand Down
4 changes: 2 additions & 2 deletions src/EasyApp/Logic/Utils/Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

# Utils

def generalizePath(fpath: str) -> str:
def generalize_path(fpath: str) -> str:
"""
Generalize the filepath to be platform-specific, so all file operations
can be performed.
:param URI rcfPath: URI to the file
:param URI fpath: URI to the file
:return URI filename: platform specific URI
"""
filename = urlparse(fpath).path
Expand Down