delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/08/02/10:14:51

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Subject: Re: [geda-user] Plans for gEDA/gaf
To: geda-user AT delorie DOT com
References: <20160723065723 DOT GC17595 AT localhost DOT localdomain>
<alpine DOT DEB DOT 2 DOT 00 DOT 1607231009290 DOT 7286 AT igor2priv>
<20160723092248 DOT GF17595 AT localhost DOT localdomain>
<alpine DOT DEB DOT 2 DOT 11 DOT 1607231423480 DOT 2224 AT nimbus>
<20160724053502 DOT GM17595 AT localhost DOT localdomain>
<alpine DOT DEB DOT 2 DOT 11 DOT 1607271434200 DOT 1841 AT nimbus>
<9719FF2C-AC85-4824-89E9-447216E7FA65 AT sbcglobal DOT net>
<alpine DOT DEB DOT 2 DOT 11 DOT 1607301258260 DOT 1409 AT nimbus>
<939E39F7-B4DA-4B56-A640-C7E6E4ECF955 AT sbcglobal DOT net>
<f5b0d73a-6d4f-d0d6-c67e-d4dea979b974 AT ecosensory DOT com>
<20160802122208 DOT GA12372 AT visitor2 DOT iram DOT es>
From: "John Griessen (john AT ecosensory DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
Message-ID: <193dbc32-63cb-2643-b741-d6bfc6a268e2@ecosensory.com>
Date: Tue, 2 Aug 2016 09:13:27 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Icedove/45.1.0
MIME-Version: 1.0
In-Reply-To: <20160802122208.GA12372@visitor2.iram.es>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u72EDa7o029679
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 08/02/2016 07:22 AM, Gabriel Paubert (paubert AT iram DOT es) [via geda-user AT delorie DOT com] wrote:
>> Why not QT4 or QT5?
> No C bindings for QT, unless I missed something. It's natively C++,
> which is a big no-no for some people.
>
> My personal feelings are quite different, I hated C++ until C++11
> arrived. C++11 (and later) really is a different language altogether.

So, the straight C GUI toolkits are limited to GTK+, XAW?

Searching on "C bindings for QT" gives these interesting results:


============http://stackoverflow.com/questions/1728509/does-qt-have-a-c-interface=============

To use Qt, you must have a C++ compiler. But it doesn't mean that your "application logic" can't be written in C, compiled with a 
C compiler and carefully linked to the C++ part (the GUI with Qt). This application logic can be generic, linkable into other 
executables (pure-C, mixed C/C++, etc.) It all depends on what you need.

you may shape your program as set of libraries achieving your business logic and write them in C, then you can use a little C++ to 
bind what you wrote as library with a GUI using QT.

This is a good approach also because later you can reuse your library and implement many other front-ends with different toolkits 
or languages!

https://en.wikipedia.org/wiki/List_of_language_bindings_for_Qt_5
Qt 5 language bindings   go, Python 	PyQt[4], Python 	PyOtherSide  – only for QML,
QML 	QtQuick  – built into Qt[5], Rust 	qmlrs  – only for QML

 From Richard Dale:

     I used to maintain C bindings that were used by Objective-C and Qt# bindings. But the Smoke library is much better although 
it isn't a C binding, and I scrapped the QtC bindings to use smoke instead.
[https://techbase.kde.org/Languages/Smoke   "The main purpose of SMOKE is making it easier to write bindings from scripting 
languages to Qt and KDE - with an emphasis on ease of use and flexibility. "]

============http://stackoverflow.com/questions/1728509/does-qt-have-a-c-interface=============

===============http://endl.ch/content/cxx2rust-pains-wrapping-c-rust-example-qt5===================
Rust and QT seems a time pit:
"Another heavily used feature in C++ is overloading. Apparently Rust doesn’t support functions overloading either. Yes, I know 
it’s intentional and no, I strongly disagree with all philosophical reasons that try to “justify” it. I’m developing software in 
C++ starting from 90’s and while I’ve seen some rare examples of poor functions overloading use - this is still “must have” 
feature for any non-trivial framework, both from convenience and learning perspectives.

Anyway, arguments aside - the lack of overloading means there’s no reasonable way to use C++ methods names as Rust methods names 
without some form of deduplication. Because there’s no way I’m going to maintain the list of “intelligent” mappings for all Qt5 
methods, the renaming is done automatically by adding a number after the function name - hence “QString::new7”, “toString2”, 
“arg12” etc.

There are 5 overloads like this in Digital Clock example and 26 (!) in Image Viewer.

Note this is completely non-obvious for bindings user (why not “new6” or “new8”?), require lengthy look-up in the generated 
bindings code for each such case - plus can easily change from version to version if overloads are added or removed, breaking code 
compilation."


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019