mirror of
https://github.com/mappu/miqt.git
synced 2025-05-07 04:20:22 +00:00
examples/android: merge with helloworld[6] as they are now identical
This commit is contained in:
parent
a4a4074948
commit
66e0973242
@ -1,29 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/mappu/miqt/qt"
|
|
||||||
)
|
|
||||||
|
|
||||||
func myRealMainFunc() {
|
|
||||||
|
|
||||||
qt.NewQApplication(os.Args)
|
|
||||||
|
|
||||||
btn := qt.NewQPushButton3("Hello world!")
|
|
||||||
btn.SetFixedWidth(320)
|
|
||||||
|
|
||||||
var counter int = 0
|
|
||||||
|
|
||||||
btn.OnPressed(func() {
|
|
||||||
counter++
|
|
||||||
btn.SetText(fmt.Sprintf("You have clicked the button %d time(s)", counter))
|
|
||||||
})
|
|
||||||
|
|
||||||
btn.Show()
|
|
||||||
|
|
||||||
qt.QApplication_Exec()
|
|
||||||
|
|
||||||
fmt.Println("OK!")
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
// +build android
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import "C" // Required for export support
|
|
||||||
|
|
||||||
//export AndroidMain
|
|
||||||
func AndroidMain() {
|
|
||||||
myRealMainFunc()
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
// Must be empty
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
// +build !android
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
myRealMainFunc()
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
qt "github.com/mappu/miqt/qt6"
|
|
||||||
)
|
|
||||||
|
|
||||||
func myRealMainFunc() {
|
|
||||||
|
|
||||||
qt.NewQApplication(os.Args)
|
|
||||||
|
|
||||||
btn := qt.NewQPushButton3("Hello world!")
|
|
||||||
btn.SetFixedWidth(320)
|
|
||||||
|
|
||||||
var counter int = 0
|
|
||||||
|
|
||||||
btn.OnPressed(func() {
|
|
||||||
counter++
|
|
||||||
btn.SetText(fmt.Sprintf("You have clicked the button %d time(s)", counter))
|
|
||||||
})
|
|
||||||
|
|
||||||
btn.Show()
|
|
||||||
|
|
||||||
qt.QApplication_Exec()
|
|
||||||
|
|
||||||
fmt.Println("OK!")
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
// +build android
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import "C" // Required for export support
|
|
||||||
|
|
||||||
//export AndroidMain
|
|
||||||
func AndroidMain() {
|
|
||||||
myRealMainFunc()
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
// Must be empty
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
// +build !android
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
myRealMainFunc()
|
|
||||||
}
|
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Loading…
x
Reference in New Issue
Block a user