Planned maintenance: From Sunday 8th December 10:00 CET there will be changes to try and solve the caching issues that have been experienced. If anyone has a problem connecting after this period then please PM @AndyS or any of the moderators.
Ui classes and export/import
I have some user interface put into a dynamic library. It does contain some widgets that I don't want exported, so I've given them the
Q_DECL_HIDDENspecifier. Then I have a form that employs one of those widgets, so the uic is generating a class for me. The problem is I get the following warning:
"'SomeUiGeneratedClass' declared with greater visibility than the type of its field SomeUiGeneratedClass::notExportedClassMember".
I know that g++ is trying to export the Ui generated class because no explicit visibility was specified (since it's generated). Is there any way to tell qmake/uic that I don't want my Ui classes generated in the global namespace, but instead for example in an anonymous one? I realize I could pass g++ the relevant flag, but since I'm going to compile on different platforms, and probably want to support other compilers beside g++ I'm looking for a somewhat portable solution. Any suggestions are greatly appreciated.
(I'm currently developing with Qt 5.6 on Linux with g++)