[Kstars-devel] Review Request: Trouble creating the Supernova Options tab in Configure KStars dialog.

Rafal Kulaga rl.kulaga at gmail.com
Sun Oct 16 18:45:52 UTC 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102895/#review7404
-----------------------------------------------------------


Hi Samikshan! At first I was like "WTF?!", but now I see where the problem is. Actually, there is no problem - the code does exactly what it should :-)

The problem is that you're setting 'enabled' property which represents whether widget is disabled or enabled (i.e. accepts user input). So when you call setEnabled(false), for the instance of QCheckBox class it won't accept user input anymore.

What you probably wanted to set, is check state of the QCheckBox, accessible through QCheckBox::checkState() and QCheckBox::setCheckState(), which deal with Qt::CheckState enumerations instead of boolean values, to facilitate for tristate checkboxes.

I hope that this solves your problem :-)

Anyway, I guess you'll want to set some options in slots?

- Rafal Kulaga


On Oct. 16, 2011, 3:10 p.m., Samikshan Bairagya wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102895/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2011, 3:10 p.m.)
> 
> 
> Review request for KStars, Rafal Kulaga and Akarsh Simha.
> 
> 
> Description
> -------
> 
> When the check boxes in Supernova Options tab is clicked twice the check boxes get disabled. I am not being able to figure out where the problem is. I have created three new files opssupernovae.ui, opssupernovae.h and opssupernovae.cpp. I designed the UI file using QtDesigner. 
> 
> 
> Diffs
> -----
> 
>   kstars/CMakeLists.txt 6f7ed20 
>   kstars/kstars.kcfg e8c9bf7 
>   kstars/kstarsactions.cpp 15d2552 
>   kstars/kstarsdcop.cpp c045e47 
>   kstars/options/opssupernovae.h PRE-CREATION 
>   kstars/options/opssupernovae.cpp PRE-CREATION 
>   kstars/options/opssupernovae.ui PRE-CREATION 
>   kstars/skycomponents/supernovaecomponent.h ab824c6 
>   kstars/skycomponents/supernovaecomponent.cpp 5c3c8bb 
> 
> Diff: http://git.reviewboard.kde.org/r/102895/diff/diff
> 
> 
> Testing
> -------
> 
> 
> Screenshots
> -----------
> 
> Screenshot
>   http://git.reviewboard.kde.org/r/102895/s/310/
> 
> 
> Thanks,
> 
> Samikshan Bairagya
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20111016/77e6997e/attachment.html>


More information about the Kstars-devel mailing list