Using QCompleter via Go QML

307 views
Skip to first unread message

sankar.c...@gmail.com

unread,
May 16, 2014, 11:57:07 AM5/16/14
to go-...@googlegroups.com
Hi,

I am a beginner to Qt. I have always stayed away from Qt as I disliked C++ and was happy with GTK+.

I love Golang. For various reasons, I was not happy with GTK and wanted to write my next application (an editor with auto-completion) in Qt using the Go QML package.

But I was not able to find any example program that uses QCompleter of Qt from Go.

I was not able to find any good offline tutorial or documentation for QML + Go, as I am not always online.

Can someone point me to any relevant example golang code snippet that uses QCompleter or a tutorial ?

Thanks

Sankar

Gustavo Niemeyer

unread,
May 26, 2014, 8:18:37 AM5/26/14
to Sankar P, Go QML
Hi Sankar,

On Fri, May 16, 2014 at 5:57 PM, <sankar.c...@gmail.com> wrote:
> But I was not able to find any example program that uses QCompleter of Qt
> from Go.

There's no way to do that right now, because QCompleter is a component
of classical Qt and not available to QML. That said, we can integrate
things from standard Qt easily, but in most cases it only makes sense
to do so if they play with a QML application, as we're not defining as
a goal to have classical Qt fully working.

As an example, this blog post describes the process of integrating a
non-GUI Qt extension via Go QML, within its own Go package:

http://blog.labix.org/2014/03/21/arbitrary-qt-extensions-with-go-qml

That's probably more information than you need to care about, though,
and as long as the integration is sensible and generally useful I'm
willing to do that work for you.

> I was not able to find any good offline tutorial or documentation for QML +
> Go, as I am not always online.

We don't have any tutorials yet. The best documentation sources at the
moment are the Go QML package documentation (see the intro at the top)
[1], the examples [2], and the common QML documentation [3].

[1] http://godoc.org/gopkg.in/qml.v0
[2] https://github.com/go-qml/qml/tree/master/examples
[3] http://qt-project.org/doc/qt-5/qtqml-index.html


gustavo @ http://niemeyer.net

Sankar P

unread,
May 29, 2014, 6:16:01 AM5/29/14
to Gustavo Niemeyer, Go QML
Thanks for the response. I have avoided Qt all these days because I
generally prefer C and so have naturally went to GTK. With the
direction GTK+ is taking and the Golang QML work, I thought, this may
be best fit for me and I can just jump in and replace GTK for all my
needs :)

I will try to understand more from the links that you sent. Thanks.
--
Sankar P
http://psankar.blogspot.com
Reply all
Reply to author
Forward
0 new messages