Page 1 of 1
QComboBox Documentation Issue
Posted: Tue Aug 22 2023 9:17 pm
by seasoned_geek
All,
Really wish we could put screen shots up here.
When you go here:
https://www.copperspice.com/docs/cs_api/class_qcombobox.html#ad327ec54dc1f47543d2407bdc28282fb
You see this
https://www.logikalsolutions.com/wordpress/wp-content/uploads/2023/08/Screenshot-from-2023-08-22-16-12-56.png
When you go here
https://www.copperspice.com/docs/cs_api/class_qcombobox.html
You see this
https://www.logikalsolutions.com/wordpress/wp-content/uploads/2023/08/Screenshot-from-2023-08-22-16-15-17.png
Note that cs_currentIndexChanged() isn't there. What is there is the old SIGNAL() SLOT() stuff for currentIndexChanged()
Re: QComboBox Documentation Issue
Posted: Thu Aug 24 2023 3:21 am
by barbara
The SIGNAL currentIndexChanged is overloaded however this is the name of the signal users should be looking for. The NOTIFY property you mentioned is showing our internal SIGNAL name. We will modify the documentation and not list the internal name.
Barbara
Re: QComboBox Documentation Issue
Posted: Thu Aug 24 2023 9:51 am
by seasoned_geek
Well the internal name is currently the only one that works, so please leave it.
Re: QComboBox Documentation Issue
Posted: Fri Sep 08 2023 4:31 am
by barbara
We verified the method which emits the SIGNAL and both
cs_currentIndexChanged(int) and
currentIndexChange(int) are emitted. So you can use either one but for consistency it would be better to use the one without the prefix.
You mentioned there was an issue so I am including the connect() used our testing. The
cs_mp_cast<> is only required to resolve overloads. There are two signals with the same name, one which passes an int and another which passes a QString.
Code: Select all
connect(split_A, cs_mp_cast<int>(&QComboBox::currentIndexChanged), this,
[] () { QMessageBox::information(nullptr, "Test Signal / Slot", "Signal was emitted"); }
);
Re: QComboBox Documentation Issue
Posted: Mon Sep 11 2023 8:00 pm
by seasoned_geek
Did not get compile or runtime error, simply didn't work. The internal did work but I didn't really like so ripped out that code and rewrote to use currentTextChanged().
I have no doubt your internal testing shows "emitted." There were no connect errors what-so-ever yet the slot never got called.
Re: QComboBox Documentation Issue
Posted: Tue Sep 12 2023 2:50 pm
by barbara
Please email or post the exact code which did not trigger the slot method. We would like to test this and figure out what was not working.
Thanks,
Barbara
Re: QComboBox Documentation Issue
Posted: Wed Jan 17 2024 1:00 pm
by seasoned_geek
I don't have a snippet or nice test case for you. The code will be in one of these 3 check-ins if I still have it.
https://sourceforge.net/p/reddiamond/code/ci/e5dd3abd1afd66ecc270f1e94d2976fff408f332/log/?path=
78103c
c7cffc
933cb9
I might have found it and fixed it before the check-in though.