# About d pointer structure of slicer application

**URL:** https://discourse.slicer.org/t/about-d-pointer-structure-of-slicer-application/19304
**Category:** Development
**Created:** [August 23, 2021, 7:05am UTC](https://discourse.slicer.org/t/about-d-pointer-structure-of-slicer-application/19304 "2021-08-23T07:05:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![xianger-qi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/xianger-qi/32/11944_2.png) [@xianger-qi](https://discourse.slicer.org/u/xianger-qi)
#### Post date: [August 23, 2021, 7:05am UTC](https://discourse.slicer.org/t/about-d-pointer-structure-of-slicer-application/19304/1 "2021-08-23T07:05:37Z")

</div>

there are a question about d pointer structure of slicer application that is why using a number of d pointer, q pointer to wrap classes. Even if those classes locate in the same project. In my view, the purpose of d pointer is convenient software update by replacing dynamic libraries without recompiling the whole source files. But Using d pointer, q pointer structure in the internal project confuses me. Thanks for reading!

---

<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: [August 23, 2021, 1:34pm UTC](https://discourse.slicer.org/t/about-d-pointer-structure-of-slicer-application/19304/2 "2021-08-23T13:34:13Z")

</div>

We welcome any suggestions to improve the documentation of this. If you still have any doubts about why and how the mechanism works then let us know.

---

<div class="post-metadata">

### Author: ![xianger-qi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/xianger-qi/32/11944_2.png) [@xianger-qi](https://discourse.slicer.org/u/xianger-qi)
#### Post date: [August 24, 2021, 1:21am UTC](https://discourse.slicer.org/t/about-d-pointer-structure-of-slicer-application/19304/3 "2021-08-24T01:21:01Z")

</div>

Thansk for replaying!! I just want to know what is the purpose for d pointer (Q\_D)and q(Q\_Q) pointer in slicer application.

---

<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: [August 24, 2021, 1:56am UTC](https://discourse.slicer.org/t/about-d-pointer-structure-of-slicer-application/19304/4 "2021-08-24T01:56:23Z")

</div>

You can learn more about the private implementation (PIMPL) idiom here: [c++ - How to use the Qt's PIMPL idiom? - Stack Overflow](https://stackoverflow.com/questions/25250171/how-to-use-the-qts-pimpl-idiom)
