English 中文(简体)
使用来自非Qt DLL (JNA) 的 QTimer 时器
原标题:Using QTimer from non-Qt DLL (JNA)

I wrote a library (DLL). Java code uses my DLL with JNA. In library I creates Qtimer by "new" in QThread derived class.

但我有以下错误:

ERROR: QTimer can only be used with threads started with QThread

我应如何适当使用 Quimer 来从非Qt线中引用而不使用 QApplication/QCoreApplication?

问题回答

不幸的是, Qimer 需要 QCoreApplication 就我所知的 。 同时, QCoreApplication 也必须在创建第一个 QObject I see 的线条中进行即时化 。 我所做的是即时化 QCoreApplication 一种使用 < a href=" http://qt- project.org/doc/qt-4.8/qtcontrentrun. html#rentrorrun" rel="nofolpol" {tConcurrent::: run < / a> 和即时化我的 QObjects:: run < a > 和即时化我的QObjects。 我报告了一个微不足道的例子 : < a href="http:// bubugfreeblog.bbspot.it/2012/05/embeded- cross- plat- develop- develop- development- for.html.html" rel= " rel=" real= "nofol= "nofolth > > < a now now to for now to wor.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签