Qqt - syntactic sugar for Qt

Sources . Compared to html, creating new windows on Qt is more difficult - you need to specify the type of the “tag” window, create a new variable, fill in individual fields. In an attempt to solve this problem, the Qqt library arose. For example, you can disregard the order and number of parameters when creating a QAction:
Action act(tr("Text"), QIcon(":/iconPath"), tr("tooltip"), QKeySequence("Ctrl+f"));
//илиAction act(QIcon(), QKeySequence(), tr("text"), tr("tooltip"));
//Аналогично при создании кнопок и других элементов:PushButton btn(QIcon(), tr("text"), tr("toooltip")...);
PushButton btn(QKeySequence(), ...;
//Заполнить поля можно сокращенным синтаксисом:
Action a;
a.text = "";
a.icon = QIcon();
a.toolTip = "";

In the example above, the Action variable calls new QAction, stores a pointer to the original, has a type conversion operator to QAction *, and this pointer can be used in normal work - for example, in a call to QObject :: connect. If you declare variables from this library inside the class, then normal calls to new in the constructor are also not required; you can proceed immediately to filling in the necessary properties.

Simplification is observed in working with layouts (see the documentation). As a result, it’s much more convenient for me not to use the GUI editor, but to write the code right away - and I don’t have to switch between the code editor and the GUI.

BSD license, I rarely update the code - the source code in the company is stored on another version control system, and on git it is posted only for legalization in the BSD license. After Qt appears under VS 2013, the library will be switched to using variadic templates instead of the current parameter enumeration.

Also popular now: