Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Longhanks/qlift
Swift library to use Qt
https://github.com/Longhanks/qlift
Last synced: 12 days ago
JSON representation
Swift library to use Qt
- Host: GitHub
- URL: https://github.com/Longhanks/qlift
- Owner: Longhanks
- License: mit
- Created: 2017-07-10T08:21:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-19T14:15:25.000Z (over 2 years ago)
- Last Synced: 2024-10-01T01:08:19.525Z (about 1 month ago)
- Language: C++
- Size: 756 KB
- Stars: 131
- Watchers: 8
- Forks: 18
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Qlift
Swift 5 API for Qt5[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/Longhanks/qlift-swift-example/master/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:
```swift
linkerSettings: [
.linkedFramework("QtWidgets", .when(platforms: [.macOS])),
.linkedFramework("QtCore", .when(platforms: [.macOS])),
.linkedFramework("QtGui", .when(platforms: [.macOS]))
]
```
When this [bug fix](https://github.com/apple/swift-package-manager/pull/3801) arrived to Xcode release, additional linker setting may be removed.### swiftpm
`swift build`
### Examples
- [swiftmine](https://github.com/Longhanks/swiftmine "swiftmine"): Minesweeper in Swift