Comments (6)
Hey
I will look into this.
from qt.
I added the support for WinIds.
This example should work now:
package main
import (
"fmt"
"os"
"syscall"
"github.com/lxn/win"
"github.com/therecipe/qt/gui"
"github.com/therecipe/qt/widgets"
)
func main() {
widgets.NewQApplication(len(os.Args), os.Args)
var (
testWindowName = "TestWindow"
testWindow = widgets.NewQMainWindow(nil, 0)
testButton = widgets.NewQPushButton2(testWindowName, nil)
testLayout = widgets.NewQVBoxLayout()
)
testWindow.SetWindowTitle(testWindowName)
testLayout.AddWidget(testButton, 0, 0)
testWindow.Layout().DestroyQObject()
testWindow.SetLayout(testLayout)
testWindow.Show()
var (
hw = win.FindWindow(nil, syscall.StringToUTF16Ptr(testWindowName))
mainWindow = widgets.NewQMainWindow(nil, 0)
//testWindowFromId = gui.QWindow_FromWinId(testWindow.WinId())
testWindowFromId = gui.QWindow_FromWinId(uintptr(hw))
testWindowContainer = widgets.QWidget_CreateWindowContainer(testWindowFromId, nil, 0)
)
mainWindow.SetWindowTitle(fmt.Sprintf("TestWindowIds: %v %v", testWindow.WinId(), uintptr(hw)))
mainWindow.SetCentralWidget(testWindowContainer)
mainWindow.Show()
widgets.QApplication_Exec()
}
from qt.
C:\Users\5k3105\goworksp\src\github.com\therecipe\qt (master)
λ setup.bat
go run ./internal/setup/check.go
if 0 NEQ 0 exit /b 0
go run C:\Users\5k3105\goworksp;C:\Users\5k3105\goworksp\bin;C:\Users\5k3105\goworksp\local/src/github.com/therecipe/qt/internal/setup/generate.go
GetFileAttributesEx C:\Users\5k3105\goworksp;C:\Users\5k3105\goworksp\bin;C:\Users\5k3105\goworksp\local/src/github.com/therecipe/qt/internal/setup/generate.go: The filename, directory name, or volume label syntax is incorrect.
if 1 NEQ 0 exit /b 1
from qt.
You set the GOPATH to: C:\Users\5k3105\goworksp;C:\Users\5k3105\goworksp\bin;C:\Users\5k3105\goworksp\local
So, you need to simplify the GOPATH or replace %GOPATH%/src/github.com/therecipe/qt
in the setup.bat file with .
to use a relative path.
from qt.
Works great! Thank you!
And compile times are Amazing!!
from qt.
You are welcome :)
from qt.
Related Issues (20)
- not use vendor dictionary
- new version of golang compiler is no longer support cmd "go get", can update readme helper ?
- Hello! I have a problem
- deploying linux to windows build fail with newqwebengineview. thanks for your help HOT 4
- Is alive? HOT 1
- Issue with using *QFileDialog.SelectedFiles(), "interface conversion: interface {} is []interface {}, not []string" HOT 1
- /usr/bin/ld: i386 architecture of input file `/tmp/go-link-3590783856/000000.o' is incompatible with i386:x86-64 output HOT 2
- Is there an active fork of this project? HOT 8
- android APK crashes when launched
- Installation fails for Qt 6 HOT 2
- !!! Read before opening a new issue !!!
- qtdeploy may not work with Go1.20 HOT 1
- go: warning: "github.com/therecipe/qt/cmd/..." matched no packages HOT 1
- menu.Actions() panics
- How to add a property sheet file to Qt
- How can I deploy a program to an arm development board and don't see a good way
- Intermittent Qtdeploy Failures HOT 1
- Gave up - Docs need some work for new people HOT 1
- is this project still maintains, what's the latest qt version does it support HOT 2
- qtsetup fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qt.