# Problem with Slicer built in release mode on Windows

**URL:** <https://discourse.slicer.org/t/problem-with-slicer-built-in-release-mode-on-windows/23534>\
**Category:** Development\
**Tags:** build\
**Created:** [May 23, 2022, 12:29pm UTC](https://discourse.slicer.org/t/problem-with-slicer-built-in-release-mode-on-windows/23534 "2022-05-23T12:29:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![olevs](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/olevs/32/15360_2.png) [@olevs](https://discourse.slicer.org/u/olevs)\
**Post date:** [May 23, 2022, 12:29pm UTC](https://discourse.slicer.org/t/problem-with-slicer-built-in-release-mode-on-windows/23534/1 "2022-05-23T12:29:23Z")

</div>

Hi,  
Building Slicer in release mode with Visual Studio Community 2022 (Qt 5.15.2) gives some errors when trying to run the application. I’ve tested this with the 5.0.2 Slicer git tag.

Starting Slicer gives the following output:  
Switch to module: “Welcome”  
“QFormBuilder was unable to create a custom widget of the class ‘ctkCollapsibleButton’; defaulting to base class ‘QWidget’.”  
“QFormBuilder was unable to create a custom widget of the class ‘ctkCollapsibleGroupBox’; defaulting to base class ‘QGroupBox’.”  
“QFormBuilder was unable to create a custom widget of the class ‘ctkCollapsibleGroupBox’; defaulting to base class ‘QGroupBox’.”  
“QFormBuilder was unable to create a custom widget of the class ‘ctkCollapsibleGroupBox’; defaulting to base class ‘QGroupBox’.”

And trying to open a module like “Add DICOM Data” gives:  
“QFormBuilder was unable to create a custom widget of the class ‘qMRMLSubjectHierarchyTreeView’; defaulting to base class ‘QTreeView’.”  
“QFormBuilder was unable to create a custom widget of the class ‘ctkCollapsibleButton’; defaulting to base class ‘QWidget’.”  
“QFormBuilder was unable to create a custom widget of the class ‘ctkCollapsibleButton’; defaulting to base class ‘QWidget’.”  
“QFormBuilder was unable to create a custom widget of the class ‘ctkDirectoryButton’; defaulting to base class ‘QWidget’.”  
“QFormBuilder was unable to create a custom widget of the class ‘ctkCollapsibleButton’; defaulting to base class ‘QWidget’.”  
Database folder does not contain ctkDICOM.sql file: C:/Users/olevs/Documents/SlicerDICOMDatabase  
Traceback (most recent call last):  
File “D:/d/S-release-22/Slicer-build/lib/Slicer-5.0/qt-scripted-modules/DICOM.py”, line 608, in setup  
self.ui.subjectHierarchyTree.setMRMLScene(slicer.mrmlScene)  
AttributeError: QTreeView has no attribute named ‘setMRMLScene’

---

<div class="post-metadata">

**Author:** ![olevs](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/olevs/32/15360_2.png) [@olevs](https://discourse.slicer.org/u/olevs)\
**Post date:** [May 24, 2022, 11:07am UTC](https://discourse.slicer.org/t/problem-with-slicer-built-in-release-mode-on-windows/23534/2 "2022-05-24T11:07:24Z")

</div>

Building the same code in release mode with Visual Studio Professional 2019 seems to work ok, but requires Visual Studio to be updated with the latest patches.
