Note that there are some explanatory texts on larger screens.

plurals
  1. POincluding Qt headers in DLL
    primarykey
    data
    text
    <p>I have a DLL in wich I would like to take a reference to a QObject and manipulate it, without actually creating an interface. So, I included "Qt/qobject.h" and compiled, but the compiler (Visual Studio 2008 pro) gives me syntax errors. It looks like it doesn't recognize the QThread object. How do I use a QObject in my dll? Is this even possible? Do I have to start my program from a Qt app? I'm actually trying to set a system-wide hook and get 3rd application QWidgets to manipulate... Any idea how I can use QObject in my dll?</p> <p>Here are the errors:</p> <pre><code>1&gt;------ Build started: Project: FroggerDLL, Configuration: Debug Win32 ------ 1&gt;Compiling... 1&gt;FTClient.cpp 1&gt;c:\qt-win-opensource-src-4.5.2\src\corelib\kernel\qobject.h(154) : error C2059: syntax error : 'type' 1&gt;c:\qt-win-opensource-src-4.5.2\src\corelib\kernel\qobject.h(154) : error C2238: unexpected token(s) preceding ';' 1&gt;c:\qt-win-opensource-src-4.5.2\src\corelib\kernel\qobject.h(155) : error C2144: syntax error : 'int' should be preceded by ')' 1&gt;c:\qt-win-opensource-src-4.5.2\src\corelib\kernel\qobject.h(155) : error C2144: syntax error : 'int' should be preceded by ';' 1&gt;c:\qt-win-opensource-src-4.5.2\src\corelib\kernel\qobject.h(155) : error C2059: syntax error : ')' 1&gt;c:\qt-win-opensource-src-4.5.2\src\corelib\kernel\qobject.h(155) : error C2208: 'int' : no members defined using this type 1&gt;FroggerDLL - 6 error(s), 1 warning(s) ========== Build: 0 succeeded, 1 failed, 3 up-to-date, 0 skipped ========== </code></pre> <p>Any help would be greatly appreciated,</p> <p>Thanks</p> <p>Dave </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload