Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 1.17 KB

README.md

File metadata and controls

30 lines (20 loc) · 1.17 KB

Qlift

Swift 5 API for Qt5

GitHub license

This package provides two things:

  • A Swift package that wraps Qt5 to a swifty API.
  • An executable called qlift-uic, that can be used in a similiar fashion to Qt's uic: Provided with a file path, it compiles *.ui files to native Swift code.

Building

Qt5 must be installed. On macOS, use brew install qt@5. On Linux, pkgconfig is used to find the build flags. On macOS, .pc files also is used to find Qt frameworks and build flags, but it requires additional preparation. Add this lines to build target:

linkerSettings: [
    .linkedFramework("QtWidgets", .when(platforms: [.macOS])),
    .linkedFramework("QtCore", .when(platforms: [.macOS])),
    .linkedFramework("QtGui", .when(platforms: [.macOS]))
]

When this bug fix arrived to Xcode release, additional linker setting may be removed.

swiftpm

swift build

Examples