# QT+MRML develop

**URL:** <https://discourse.slicer.org/t/qt-mrml-develop/18976>\
**Category:** Development\
**Tags:** mrml\
**Created:** [July 29, 2021, 4:54pm UTC](https://discourse.slicer.org/t/qt-mrml-develop/18976 "2021-07-29T16:54:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuguoxin](https://avatars.discourse-cdn.com/v4/letter/y/7bcc69/32.png) [@yuguoxin](https://discourse.slicer.org/u/yuguoxin)\
**Post date:** [July 29, 2021, 4:54pm UTC](https://discourse.slicer.org/t/qt-mrml-develop/18976/1 "2021-07-29T16:54:31Z")

</div>

main.cpp  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/8/68d6768e9431bf7fee52564f54f58b53ed5f88de.png)  
mainwindow.cpp

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/e/0edd46ee5620d69d8b9aa1e422c8ba05592a5b0b.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/9/695c4018c53085bbae2f3d6767f90f0c9b788de1.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/9/492ee69ea4fe7b852281f2c52bc91d402c0d8cf6.png)  
when running the exe, exception happen  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/6/f6a2c4b49e394975e3fbc1d61e83573c09d269b2.png)  
can you tell me why?

---

<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:** [July 31, 2021, 10:39pm UTC](https://discourse.slicer.org/t/qt-mrml-develop/18976/2 "2021-07-31T22:39:27Z")

</div>

Most `qSlicer*` classes assume that the application class is `qSlicerApplication` and not just a generic `QApplication`. Currently, the easiest way is to run Slicer-dependent Python code in Slicer’s Python environment (using command-line arguments, or Slicer’s Python console, or Slicer’s Jupyter kernel, or using Slicer web server, etc.).

In the future, maybe in a year or two, we will make essential Slicer libraries (MRML, vtkSegmentationCore, vtkAddon, vtkITK, etc.) easily pip-installable and usable without instantiating a Slicer application. Later we may make module logics and GUI widgets independently available, too. If you wanted to get this earlier and you are willing learn the internals of Slicer and work in C++ then let us know, we can help you getting started.
