CommonUI
What is CommonUI?
Part of C++ SDK and provides classes to implement UI like dialogs and palettes across Deskop,
Cloud and Mobile platforms.
It is less capable than using Xe widget or Wt native widgets but most frequently used functionality is implemented and we keep extending it as needed.
Available widgets
Checkbox, ComboBox, Dialog, DockWidget, GroupBox, Label, ListWidget,
Menu, Push and ToolButtons, RadioButton and Group, ScrollableArea, Slider, Spin box,
StackedWidget, TabWidget, TextEdit (single line), TextView (multi line)
Layouts
Horizontal and Vertical Layouts
Other functionality
Timer, Basic Networking
Why to use CommonUI?
Although it is less capable as native widgets, it is the recommended way to implement your UI in modules that should run across Deskop,
Cloud and Mobile platforms. A single code base will give you a consistent styled UI across the platform.
Known issues and how to solve
I started to see QLatin1Char/QChar type redefinition compile errors.
Compile error
Error C2011 'QLatin1Char': 'struct' type redefinition c:\workspace\5.9.3_x64\include\qtcore\qchar.h 51
Error C2011 'QChar': 'class' type redefinition c:\workspace\5.9.3_x64\include\qtcore\qchar.h 62
Problem
FxQtCore.h from SDK inc defines some Qt stuff for the case there is no Qt access (#if !defined(QSTRING_H) || !defined(QCHAR_H)).
This is causing problems if including Qt headers later what is done through commonUI.
We have already a task planned to remove the Qt dependency from commonUI but until this is fixed we need to make sure to include Qt headers (that are included via commonUI) before FxQtCore.h.
Solution
Include FxUIObject.h first before including any other headers from SDK inc, e.g. by adding include to stdafx.h
#include <FxUIObject.h>