A go lang uic for therecipe qt binding. Refer to: https://github.com/therecipe/qt
- Install therecipe qt binding: https://github.com/therecipe/qt
- Install goqtuic:
go get -u -v github.com/stephenlyu/goqtuic
- Check goqtuic usage:
goqtuic -help
A go lang uic for therecipe qt binding.
A go lang uic for therecipe qt binding. Refer to: https://github.com/therecipe/qt
go get -u -v github.com/stephenlyu/goqtuic
goqtuic -help
Hello,
Many thanks to this great tool, I was trying to use it again after to convert a small tool a long time and this is what I got:
goqtuic.exe -ui-file .\lofloccus.ui
Translating .\lofloccus.ui...
2019/04/25 11:12:26 [WARN][github.com/stephenlyu/goqtuic/parser] compiler.go:1236: Should add code for GroupBox inner widget?
2019/04/25 11:12:26 [WARN][github.com/stephenlyu/goqtuic/parser] compiler.go:1236: Should add code for GroupBox inner widget?
2019/04/25 11:12:26 [WARN][github.com/stephenlyu/goqtuic/parser] compiler.go:1236: Should add code for GroupBox2 inner widget?
panic: interface conversion: interface {} is *parser.Set, not int
goroutine 1 [running]:
github.com/stephenlyu/goqtuic/parser.(*compiler).translateLayout(0xc00005ca90, 0xc000155420, 0x16, 0xc0000e6180)
C:/Users/TCB13/go/src/github.com/stephenlyu/goqtuic/parser/compiler.go:748 +0x162f
github.com/stephenlyu/goqtuic/parser.(*compiler).translateWidget(0xc00005ca90, 0xc000129e80, 0xe, 0xc00009d0e0)
C:/Users/TCB13/go/src/github.com/stephenlyu/goqtuic/parser/compiler.go:1207 +0x17af
github.com/stephenlyu/goqtuic/parser.(*compiler).translateWidget(0xc00005ca90, 0xc000155220, 0x12, 0xc00009d200)
C:/Users/TCB13/go/src/github.com/stephenlyu/goqtuic/parser/compiler.go:1212 +0xba7
github.com/stephenlyu/goqtuic/parser.(*compiler).translateWidget(0xc00005ca90, 0xc000129030, 0xa, 0xc00014c240)
C:/Users/TCB13/go/src/github.com/stephenlyu/goqtuic/parser/compiler.go:1212 +0xba7
github.com/stephenlyu/goqtuic/parser.(*compiler).GenerateCode(0xc00005ca90, 0xc00000c4cd, 0x5, 0xc000012380, 0x32, 0xc00000a380, 0xf)
C:/Users/TCB13/go/src/github.com/stephenlyu/goqtuic/parser/compiler.go:1378 +0x2c8
main.translateUIFile(0xc00000a0d0, 0xe, 0x70718a, 0x5, 0x0, 0x0, 0x11, 0xc00004abf0)
C:/Users/TCB13/go/src/github.com/stephenlyu/goqtuic/main.go:27 +0x30a
main.main()
C:/Users/TCB13/go/src/github.com/stephenlyu/goqtuic/main.go:87 +0x228
Just for reference, you can find my .ui
file attached.
lofloccus.zip
Any tips? Also, what should I do about the warnings?
Thank you.
在转换QT文件时遇到下面的错误,请教如何处理。
Translating E:/test.ui...
2021/03/30 10:47:26 widget name: tab has 1 attributes
2021/03/30 10:47:26 widget name: tab_2 has 1 attributes
2021/03/30 10:47:26 widget name: tab_3 has 1 attributes
2021/03/30 10:47:26 widget name: tab_4 has 1 attributes
2021/03/30 10:47:26 widget name: tab_5 has 1 attributes
2021/03/30 10:47:26 widget name: index has 1 attributes
2021/03/30 10:47:26 widget name: folderMode has 1 attributes
2021/03/30 10:47:26 [ERROR][UNKNOWN] compiler.go:189: unknown enum QTabWidget::Rounded
2021/03/30 10:47:26 [ERROR][UNKNOWN] compiler.go:189: unknown enum QTabWidget::South
2021/03/30 10:47:26 [ERROR][UNKNOWN] compiler.go:189: unknown enum QTabWidget::Triangular
2021/03/30 10:47:26 [ERROR][UNKNOWN] compiler.go:189: unknown enum QTabWidget::South
hello,stephenlyu
this day when I go get -u -v https://github.com/stephenlyu/goqtuic and found that github.com/jteeuwen/go-pkg-xmlx repository is 404. and not easy to find its copy any more.
which will make goqtuic hard to compile for other people.
Hello,
i experienced this following error an i think it is because Qt5 higher versions are not supported fully by this code anymore.
Therefore an fix OR an information which versions of Qt are supported would be highly appreciated :)
The error:
I created an UI file using QtDesigner 5.15.2.
I added several menubar options (Menu, Settings, Help) items with several actions (Change Language, Open Help File, ... ).
As i translated this to go code and run the code, i got following error:
ui\uigen\main_ui.go:100:38: cannot use this.MenuChangeLanguage (variable of type *widgets.QMenu) as type widgets.QAction_ITF in argument to this.MenuSettings.QWidget.AddAction:
*widgets.QMenu does not implement widgets.QAction_ITF (missing QAction_PTR method) (exit status 2)
This is a screenshot of the created Go code for a clearer understanding on the Menubar options and items.
The error from above is at line 100.
I tried several things:
Thanks for this software.
However, when I attempt to install it I get:
$ go get -u -v github.com/stephenlyu/goqtuic/...
github.com/stephenlyu/goqtuic (download)
github.com/jteeuwen/go-pkg-xmlx (download)
github.com/z-ray/log (download)
github.com/therecipe/qt (download)
github.com/therecipe/qt/core
go/src/github.com/therecipe/qt/core/core.cpp:9:30: fatal error: QAbstractAnimation: No such file or directory
#include
^
compilation terminated.
This is Ubuntu 14.04 64-bit and I have Qt5.2.1 and Go 1.8.3 installed.
QAbstractAnimation is at my directory /usr/include/qt5/QtCore
Could you kindly direct me on how to proceed? I suspect that somehow, I need to point this installer to the correct path or set an environment variable/path?
Thanks so much,
Phil
Hello
github.com/jteeuwen/go-pkg-xmlx doesn't exit anymore.
Unable to install goqtuic
THX
Hi 大佬,最近想用一下therecipe/qt这个库,但是自己不会写widgets的各种配置,因此看到您这个库非常好。
有些指针,或者signal/slot的用起来不方便,想自己做些更改,是否可以让我成为库的开发者?
我保证不乱来。
I'm trying to use qoqtuic
to compile an existing QT .ui
file but I have multiple occurrences of the error
QGridLayout.AddItem not support now, QLayout.AddItem used
Is it a limitation of goqtuic
or of therecipe/qt
? Could it be possible to add the support of it ?
There are also multiple unknown enums.
2022/01/20 18:03:00 [ERROR][UNKNOWN] compiler.go:189: unknown enum QMainWindow::AllowNestedDocks
2022/01/20 18:03:00 [ERROR][UNKNOWN] compiler.go:189: unknown enum QMainWindow::AllowTabbedDocks
2022/01/20 18:03:00 [ERROR][UNKNOWN] compiler.go:189: unknown enum QMainWindow::AnimatedDocks
2022/01/20 18:03:00 [ERROR][UNKNOWN] compiler.go:189: unknown enum QTabWidget::West
2022/01/20 18:03:00 [ERROR][UNKNOWN] compiler.go:189: unknown enum QTabWidget::Rounded
2022/01/20 18:03:00 [ERROR][UNKNOWN] compiler.go:189: unknown enum QDateTimeEdit::HourSection
2022/01/20 18:03:00 [ERROR][UNKNOWN] compiler.go:189: unknown enum QDateTimeEdit::HourSection
Is it possible to fix this ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.