Skip to content

Instantly share code, notes, and snippets.

@MggMuggins
Last active July 24, 2017 18:39
Show Gist options
  • Save MggMuggins/dea7198df879e8e74c1ad8ae0aeb6cd4 to your computer and use it in GitHub Desktop.
Save MggMuggins/dea7198df879e8e74c1ad8ae0aeb6cd4 to your computer and use it in GitHub Desktop.
Buggy code...
import Glibc
import Qlift
class ChrysalisFM {
let app = QApplication()
let window = QMainWindow()
let mainWidg = QWidget()
var layout: QHBoxLayout
let v_layout = QVBoxLayout()
var button: QPushButton
init() {
self.layout = QHBoxLayout(parent: self.mainWidg)
self.button = QPushButton(text: "Add Col")
//self.layout.add(widget: self.button)
//self.layout.add(item: self.v_layout)
}
func run() -> Int32 {
print("Entering main()")
self.window.centralWidget = self.mainWidg
print("Main Widget added")
self.window.show()
print("Event loop starting")
return self.app.exec()
}
}
let app = ChrysalisFM()
exit(app.run())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment