View Issue Details

IDProjectCategoryView StatusLast Update
0001585Slicer4Core: GUIpublic2017-12-06 11:54
ReporterfinetjulAssigned To 
PrioritynormalSeveritytweakReproducibilityhave not tried
Status acknowledgedResolutionopen 
PlatformOSWindows 10OS Version
Product VersionSlicer 4.9.0 
Target VersionFixed in Version 
Summary0001585: Checkboxes in qMRMLCheckableNodeComboBox are invisible
Description

In Slicer, go to the Volume Rendering module, open the Input group, and look at the View combobox, there is no checkbox.

Steps To Reproduce

Run qMRMLCheckableNodeComboBoxTest1 and set QApplication::setStyle(new QCleanLooksStyle) before instantiating the application.

Additional Information

it seems to happen only with QCleanLooksStyle

TagsNo tags attached.

Activities

finetjul

finetjul

2011-11-25 06:10

administrator   ~0003392

QCleanlooksStyle prevents the checkmarks to be visible inside the menu combobox.
See qcleanlooksstyle.cpp:

        bool checkable = menuItem->checkType != QStyleOptionMenuItem::NotCheckable;
        bool checked = menuItem->checked;
        bool sunken = menuItem->state & State_Sunken;
        bool enabled = menuItem->state & State_Enabled;

        bool ignoreCheckMark = false;
        int checkcol = qMax(menuItem->maxIconWidth, 20);

#ifndef QT_NO_COMBOBOX
if (qobject_cast<const QComboBox*>(widget))
ignoreCheckMark = true; //ignore the checkmarks provided by the QComboMenuDelegate
#endif

        if (!ignoreCheckMark) {

Maybe it might work to:

  • create a proxy style that checks the type of base style (qcleanlooks) and
  • pass 0 (-> null) as the widget parameter for the drawControl(CE_MenuItem...) function

Another problem will then rise, how to "check" all the items, for now, qMRMLNodeComboBoxMenuDelegate does:

  • menuOption.checked = this->mCombo->currentIndex() == index.row();
    Which is incompatible with what qMRMLCheckableNodeComboBox does.
finetjul

finetjul

2011-11-25 06:25

administrator   ~0003393

Quick fix in r18765:
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=18765

Need more care though. Can be taken care of later.

sankhesh

sankhesh

2012-11-20 11:26

developer   ~0007329

Is this still an issue?

finetjul

finetjul

2012-11-20 12:00

administrator   ~0007330

Haven't checked with more recent Qt versions, but I would say it is still an issue. Very low priority though.

jcfr

jcfr

2013-08-19 07:40

administrator   ~0009511

@finetjul: Given the recent work associated with the Slicer style. Is this still an issue ?

finetjul

finetjul

2013-08-19 07:59

administrator   ~0009512

Yes, but it is an extremely low priority issue as a work around has been setup (see 0003393).

jcfr

jcfr

2014-05-12 21:21

administrator   ~0011741

Commenting line added by r18765, the checkbox do NOT appear. As mentioned by Julien, this should be fixed at some point if it become a show stopper.

Since a workaroud has been implemented, un-targeting this issue.

Davide

Davide

2017-10-02 09:08

developer   ~0015225

Last edited: 2017-10-02 09:09

View 2 revisions

Hi the issue is present again in Qt5 and the workaround I think does not work anymore or needs some fixes.

pinter

pinter

2017-12-06 11:54

developer   ~0015454

I was also able to reproduce this. I'm changing its priority to Normal from Low as after switching to Qt5 after the release of 4.8.1 this will be an issue in many Slicer modules.

Issue History

Date Modified Username Field Change
2011-11-25 05:35 finetjul New Issue
2011-11-25 05:35 finetjul Status new => assigned
2011-11-25 05:35 finetjul Assigned To => BenjaminLong
2011-11-25 06:10 finetjul Note Added: 0003392
2011-11-25 06:25 finetjul Note Added: 0003393
2011-11-25 06:25 finetjul Target Version Slicer 4.0 RSNA => Slicer 4.0 post RSNA
2012-08-21 11:42 jcfr Assigned To BenjaminLong => crmullin
2012-10-22 07:30 jcfr Assigned To crmullin => sankhesh
2012-10-22 07:30 jcfr Target Version Slicer 4.0.1 => Slicer 4.3.0
2012-11-20 11:26 sankhesh Note Added: 0007329
2012-11-20 12:00 finetjul Note Added: 0007330
2012-11-20 12:00 finetjul Priority normal => low
2013-06-03 05:15 jcfr Assigned To sankhesh => jcfr
2013-08-19 07:40 jcfr Target Version Slicer 4.3.0 => Slicer 4.4.0
2013-08-19 07:40 jcfr Note Added: 0009511
2013-08-19 07:40 jcfr Status assigned => feedback
2013-08-19 07:59 finetjul Note Added: 0009512
2013-08-19 08:00 jcfr Severity minor => tweak
2013-08-19 08:01 jcfr Status feedback => assigned
2014-05-12 21:16 jcfr File Added: Issue-1585_resolved.png
2014-05-12 21:19 jcfr File Deleted: Issue-1585_resolved.png
2014-05-12 21:21 jcfr Note Added: 0011741
2014-05-12 21:21 jcfr Assigned To jcfr =>
2014-05-12 21:21 jcfr Status assigned => acknowledged
2014-05-12 21:21 jcfr Target Version Slicer 4.4.0 =>
2017-10-02 09:08 Davide Note Added: 0015225
2017-10-02 09:09 Davide Note Edited: 0015225 View Revisions
2017-12-06 11:54 pinter Priority low => normal
2017-12-06 11:54 pinter OS Windows 7 => Windows 10
2017-12-06 11:54 pinter Product Version Slicer 4.0.0 => Slicer 4.9.0
2017-12-06 11:54 pinter Note Added: 0015454