diff --git a/HotkeyTest/hottestwidget.cpp b/HotkeyTest/hottestwidget.cpp index 292f6f9..c341b64 100644 --- a/HotkeyTest/hottestwidget.cpp +++ b/HotkeyTest/hottestwidget.cpp @@ -184,22 +184,20 @@ void HotTestWidget::on_groupBox_toggled(bool checked) hotkey->setRegistered(checked); } -void HotTestWidget::on_threadEnableCheckBox_clicked(bool checked) +void HotTestWidget::on_threadEnableCheckBox_clicked() { + this->ui->threadEnableCheckBox->setEnabled(false); this->ui->hotkeyCheckbox_1->setChecked(false); this->ui->hotkeyCheckbox_2->setChecked(false); this->ui->hotkeyCheckbox_3->setChecked(false); this->ui->hotkeyCheckbox_4->setChecked(false); this->ui->hotkeyCheckbox_5->setChecked(false); + QApplication::processEvents(); + Q_ASSERT(!this->hotkey_4->isRegistered()); Q_ASSERT(!this->hotkey_5->isRegistered()); - if(checked) { - this->hotkey_4->moveToThread(this->thread4); - this->hotkey_5->moveToThread(this->thread5); - } else { - this->hotkey_4->moveToThread(this->thread()); - this->hotkey_5->moveToThread(this->thread()); - } + this->hotkey_4->moveToThread(this->thread4); + this->hotkey_5->moveToThread(this->thread5); } diff --git a/HotkeyTest/hottestwidget.h b/HotkeyTest/hottestwidget.h index f9161ce..abdde3d 100644 --- a/HotkeyTest/hottestwidget.h +++ b/HotkeyTest/hottestwidget.h @@ -38,7 +38,7 @@ private slots: void on_groupBox_toggled(bool checked); - void on_threadEnableCheckBox_clicked(bool checked); + void on_threadEnableCheckBox_clicked(); private: Ui::HotTestWidget *ui; diff --git a/HotkeyTest/hottestwidget.ui b/HotkeyTest/hottestwidget.ui index c12140a..2857559 100644 --- a/HotkeyTest/hottestwidget.ui +++ b/HotkeyTest/hottestwidget.ui @@ -17,7 +17,7 @@ - 0 + 2 @@ -953,7 +953,13 @@ - <html><head/><body><p><span style=" font-weight:600;">Results so far:</span></p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Windows:</span> 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</li></ul></body></html> + <html><head/><body><p> +<b>Results so far:</b></br> +<ul> + <li><u>Windows:</u> 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.</li> + <li><u>Mac:</u> Works fine.</li> +</ul> +</p></body></html> Qt::RichText