What are the real GUI toolkits for D?
MGW via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jan 29 05:24:24 PST 2016
I think what to make "pure" GUI for D there is a waste of time
and forces. More effectively and faster to develop "wrapper" for
Qt.
For myself I have made library QtE which possibilities suffice
me much. The main feature that addition of a new method or
property from Qt in QtE occupies only five minutes. By the
current moment in QtE is 340 of functions Qt 4.8 "are wrapped
up".
For beginning studying of programming language D, library QtE is
the best decision.
QtE is checked up in Windows 32/64 and Linux 32/64 and depends
from Qt 4.8.x. In the near future I plan to transfer it on MAC OS
X 10.9 (64).
https://github.com/MGWL/QtE-Qt_for_Dlang_and_Forth
Some screenshots
Screen Windows
http://qte.ucoz.ru/QtE_win_2.png
Screen Linux
http://qte.ucoz.ru/QtE_linux_2.png
simple example:
Hello.d
----------------------------------------
import qte;
import core.runtime; // parametr start
int main(string[] args) {
bool fDebug; foreach (arg; args) if (arg=="--debug") fDebug =
true;
int rez = LoadQt( dll.Core | dll.Gui | dll.QtE, fDebug);
if (rez==1) return 1; // Error load QtE
QApplication app = new QApplication(&Runtime.cArgs.argc,
Runtime.cArgs.argv, 1);
QLabel label = new QLabel(null);
label.setText(“ --- Hello from QtE ---”);
label.setAlignment(QtE.AlignmentFlag.AlignCenter);
label.resize(300, 130);
label.show();
return app.exec();
}
----------------------------------------
Compile and execute:
rdmd Hello qte
More information about the Digitalmars-d
mailing list