added thread test -> fails on windows

This commit is contained in:
Skycoder42
2016-02-06 17:34:58 +01:00
parent cbdcfeed95
commit 2f31a06430
3 changed files with 99 additions and 2 deletions
+62
View File
@@ -916,6 +916,68 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="threadTab">
<attribute name="title">
<string>Threading</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>12</number>
</property>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Use this test to determine whether shortcuts on multiple threads are supported or not. Internally, the backend of the QHotkey class is &lt;span style=&quot; font-weight:600;&quot;&gt;threadsafe&lt;/span&gt;, and thus QHotkey is reentrant and can be used on any thread. However, some operating systems might not support creating hotkeys from different threads. &lt;/p&gt;&lt;p&gt;To enable threading, check the box below and return to the playground. &lt;span style=&quot; font-style:italic;&quot;&gt;Hotkey 4 and 5&lt;/span&gt; will now each run on their own thread. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="threadEnableCheckBox">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Enable Threaded Hotkeys</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Results so far:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;Windows:&lt;/span&gt; Registering on multiple threads is possible, but: The thread that registered must unregister too and events will be send to the thread registered from, not the main thread&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>