GithubHelp home page GithubHelp logo

goqtuic's Introduction

goqtuic's People

Contributors

jifanchn avatar stephenlyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

goqtuic's Issues

Error: panic: interface conversion: interface {} is *parser.Set, not int

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的ui文件失败

在转换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

Could not create MenuBar options without interface errors

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.
grafik

I tried several things:

  1. Deleting all options and leaving blank menubar:
    grafik
    grafik

  2. Deleting every menubar item and leaving it blank, which works nice.

error compiling could not find QAbstractAnimation

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

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

求加个开发者。

Hi 大佬,最近想用一下therecipe/qt这个库,但是自己不会写widgets的各种配置,因此看到您这个库非常好。

有些指针,或者signal/slot的用起来不方便,想自己做些更改,是否可以让我成为库的开发者?

我保证不乱来。

QGridLayout.AddItem not supported and unknown enum

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 ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.