Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [Solved] Add an extern function to qguiapplication.cpp
Forum Updated to NodeBB v4.3 + New Features

[Solved] Add an extern function to qguiapplication.cpp

Scheduled Pinned Locked Moved Solved Installation and Deployment
1 Posts 1 Posters 385 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lachrymology
    wrote on last edited by Lachrymology
    #1

    Hi all,

    I've a strange behaviour compiling Qt with a changed qguiapplication.cpp.

    I've added the following code to the file:

    #if defined(Q_OS_WIN)
      bool gHandlingEnabled = false;
      
      extern "C" __declspec(dllexport) void __stdcall setHandling(bool aEnable)
      {
        gHandlingEnabled = aEnable;
      }
    #endif // Q_OS_WIN
    

    My problem is that the function setHandling isn't available in Qt5Gui.dll after the build.

    If I don't use the #ifdef section the function is available. What's the matter with Q_OS_WIN? Do I need to include qsystemdetection.h?

    Kind regards,
    Mike

    EDIT: Solved - yes it was the missing include of qsystemdetection.h

    1 Reply Last reply
    1

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved