Forum
Sign Up

Compile Error qtnwindowtitlebar.cpp(1146): error C2027: use of undefined type

4 years 7 months ago #1 by James
Compiling QTitanRibbon 5.0.1 with Visual Studio 2017 (32-bit config) and Qt 5.12.4. Seeing this compile time error:

qtnwindowtitlebar.cpp(1146): error C2027: use of undefined type 'QScreen'

I'm prepared to go hack the code, but I'd like to know if there's something wrong with my build configuration before I do.

Has anyone else seen the problem?

Please Log in or Create an account to join the conversation.

More
4 years 7 months ago #2 by Developer Machines
Please add #include <QScreen> line to the header of QtnWindowTitleBar.cpp and try to rebuild.

P.S. A strange problem, since we are developing in Qt 5.12 and Qt5.13 and there is no such issue.

Please Log in or Create an account to join the conversation.

More
4 years 7 months ago #3 by James
I did add the #include to the file in order to continue with progress.

I noticed that the #include was not required when building the demos directly from the QTitanRibbon installation.

This error occurs only when building the code directly into my application. Not sure why this is happening. It might have to do with the #if on line 1145:

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
QSize size = QGuiApplication::primaryScreen()->virtualSize();

Please Log in or Create an account to join the conversation.

More
4 years 7 months ago #4 by Developer Machines
>>This error occurs only when building the code directly into my application.

How you add the code to your app? Can you provide more details?

Please Log in or Create an account to join the conversation.

More
4 years 7 months ago #5 by James
We add QTitanRibbon as a VC++ project. The project is part of a larger solution. The build flags for the project are: /D QTITAN_LIBRARY_STATIC /D QTN_NAMESPACE

Please Log in or Create an account to join the conversation.

More
4 years 7 months ago #6 by Developer Machines
Please note, you can build component library statically, in this case all defines will be added automatically. To build it statically pass "qtitan_staticlib" switch to the qmake:

qmake.exe -staticlib -r -platform <platform>
or
qmake.exe CONFIG+=qtitan_staticlib -r -platform <platform>

www.devmachines.com/documentation/Qtitan...mponent-from-sources

Please Log in or Create an account to join the conversation.

More
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer Machines
Time to create page: 0.158 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )