Project

General

Profile

Bug #7197

WSpinBox/WDoubleSpinBox valueChanged() is not emitted when connected after the spinbox is rendered

Added by Roel Standaert about 2 years ago.

Status:
New
Priority:
Low
Assignee:
-
Target version:
-
Start date:
08/14/2019
Due date:
% Done:

0%

Estimated time:

Description

When valueChanged() is connected after creating a spinbox, before it is rendered, it is properly emitted. However, when connected afterwards, it's not.

To reproduce: run the attached example and click on "Connect signals". This should cause value changes to be logged in the console, but they're not.

We're currently connecting changed() to valueChanged() in signalConnectionsChanged(). changed() is an EventSignal, and connecting this causes signalConnectionsChanged() to be invoked. valueChanged() is a WSignal, so connecting it does not (a WSignal also does not have an owner).

Workaround is either connecting the signals right after creation of the spinbox, or by connecting the changed() signal after connecting the valueChanged() signal.


Files

spinbox_valueChanged.cpp (1.04 KB) spinbox_valueChanged.cpp test to reproduce it (Wt 4) Roel Standaert, 08/14/2019 12:57 PM
spinbox_valueChanged.cpp (1.01 KB) spinbox_valueChanged.cpp test to reproduce it (Wt 3) Roel Standaert, 08/14/2019 12:57 PM

No data to display

Also available in: Atom PDF