# C++ segmentation Module building fails with Qt5 - compatibility with Qt4/Qt5 of ui files?

**URL:** <https://discourse.slicer.org/t/c-segmentation-module-building-fails-with-qt5-compatibility-with-qt4-qt5-of-ui-files/2661>\
**Category:** Development\
**Created:** [April 23, 2018, 10:05am UTC](https://discourse.slicer.org/t/c-segmentation-module-building-fails-with-qt5-compatibility-with-qt4-qt5-of-ui-files/2661 "2018-04-23T10:05:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eloise](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/eloise/32/3948_2.png) [@Eloise](https://discourse.slicer.org/u/Eloise)\
**Post date:** [April 23, 2018, 10:05am UTC](https://discourse.slicer.org/t/c-segmentation-module-building-fails-with-qt5-compatibility-with-qt4-qt5-of-ui-files/2661/1 "2018-04-23T10:05:56Z")

</div>

Hi all,

I have developed a C++ segmentation module in Slicer in a previous environment (Slicer 4.9 on Mac Os El Capitan 10.11, using Qt4), and I am now trying to build it in a new Slicer environment (Slicer 4.9 on Mac OS Sierra 10.12, using Qt5.10). I encountered difficulties in building this new Slicer with Qt4 so I used Qt5 as it was recommended as the most maintained/tested now and it worked, but the building of my segmentation modules failed in the ui files, and more especially in the qSlicerModuleNameFooBarWidget.ui (copied below), indicating an RCC Parse Error _Line: 2 Column: 18 [unexpected tag: ui]_, and I can’t find any help on such error.  
Did someone ever have this error ? The ui file is very basic and I have read that there was a compatibility from Qt4 to Qt5 for the ui files ?

```
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>qSlicerSeedSegmentation3FooBarWidget</class>
 <widget class="QWidget" name="qSlicerSeedSegmentation3FooBarWidget">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>103</width>
    <height>32</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>Foo bar</string>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout">
   <property name="margin">
    <number>0</number>
   </property>
   <item>
    <widget class="QPushButton" name="FooBarButton">
     <property name="text">
      <string>Foo Bar</string>
     </property>
    </widget>
   </item>
  </layout>
 </widget>
 <resources/>
 <connections/>
</ui>

```

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 23, 2018, 1:19pm UTC](https://discourse.slicer.org/t/c-segmentation-module-building-fails-with-qt5-compatibility-with-qt4-qt5-of-ui-files/2661/2 "2018-04-23T13:19:25Z")

</div>

> [@Eloise](#):
>
> qSlicerModuleNameFooBarWidget

There is no such file in the Slicer source code. If the file is in your own module, then I would recommend to create a new module skeleton using Slicer’s Extension Wizard module and compare the differences to your own module. Or, you can have a look at [changes to the extension template](https://github.com/Slicer/Slicer/commits/master/Utilities/Templates/Modules/Loadable) since you generated your module and apply the same changes to your module manually.
