Hi Felix, <div><br></div><div>Thanks for kind compliment and your interest in CTK :)<br><div><br></div><div>When configuring CTK, if you enable the following two options:</div><div> </div><div> CTK_BUILD_EXAMPLES</div>
<div> CTK_ENABLE_Python_Wrapping</div><div><br></div><div>an example application named "ctkSimplePythonShell" will then be built.</div><div><br></div><div>Assuming you are unix-like platform, you could then simply run the application using:</div>
<div><br></div><div> ./bin/ctkSimplePythonShell</div><div><br></div><div>See enclosed screenshot for an illustration.</div><div><br></div><div>Currently, CTK objects and widgets are "wrapped" leveraging PythonQt, I am not sure how it could be integrated with PySide or PyQt.</div>
<div><br></div><div>To learn more about PythonQt: <a href="https://github.com/commontk/PythonQt#readme">https://github.com/commontk/PythonQt#readme</a></div><div><br></div><div>All steps together:</div><div><br></div><div>
<font face="courier new, monospace">git clone git://<a href="http://github.com/commontk/CTK.git">github.com/commontk/CTK.git</a> && \</font></div><div><font face="courier new, monospace">mkdir CTK-build && \</font></div>
<div><font face="courier new, monospace">cd CTK-build && \</font></div><div><font face="courier new, monospace">cmake -DCTK_ENABLE_Python_Wrapping:BOOL=ON -DCTK_BUILD_EXAMPLES:BOOL=ON -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/jchris/Projects/QtSDK-1.2/Desktop/Qt/474/gcc/bin/qmake ../CTK && \</font></div>
<div><font face="courier new, monospace">make -j4 && \</font></div><div><font face="courier new, monospace">cd CTK-build && \</font></div><div><font face="courier new, monospace">./bin/ctkSimplePythonShell</font></div>
<div> </div><div><br></div><div>Then, within the console, you should be able to run the following command:</div><div><br></div><div>
<p style="margin:0px"><span style="font-family:'Courier';font-size:10pt;color:#000096">import ctk</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:10pt;color:#000096">w = ctk.ctkColorDialog()</span></p>
<p style="margin:0px"><span style="font-family:'Courier';font-size:10pt;color:#000096">w.show()</span></p></div><div><br></div><div>If running ccmake or cmake-gui, you could also display the list of advanced options and enable the following one:</div>
<div><br></div><div><font face="courier new, monospace"> CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTCORE</font></div><div><span style="font-family:'courier new',monospace">CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTGUI</span></div>
<div><br></div><div>You will then be able to run command like:</div><div><br></div><div><font face="courier new, monospace"> import qt</font></div><div><font face="courier new, monospace"> b = qt.QPushButton("Ciao")</font></div>
<div><font face="courier new, monospace"> b.show()</font></div><div><br></div><div>There is also possibility of interfacing CTK PythonQt and VTK by enabling:</div><div><br></div><div><font face="courier new, monospace"> CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK</font></div>
<div><br></div><div><br></div><div>Let me us know if you have additional questions.</div><div><br></div><div>Thanks</div><div>Jc</div><div><br></div><div><br><div class="gmail_quote">On Thu, Jul 12, 2012 at 4:44 PM, Félix C. Morency <span dir="ltr"><<a href="mailto:felix.morency@gmail.com" target="_blank">felix.morency@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
First, thank you for sharing such a great piece of software. I'm<br>
writing to you because I want to know if you have any plans on<br>
developing Python wrapper for CTK? I would really like to be able to<br>
use your widget in, say, a PySide application.<br>
<br>
Regards,<br>
--<br>
Félix C. Morency, M.Sc.<br>
Plateforme d’analyse et de visualisation d’images<br>
Centre Hospitalier Universitaire de Sherbrooke<br>
Centre de recherche clinique Étienne-Le Bel<br>
Local Z5-3031 | <a href="tel:819.346.1110%20ext%2016634" value="+18193461110">819.346.1110 ext 16634</a><br>
_______________________________________________<br>
Ctk-developers mailing list<br>
<a href="mailto:Ctk-developers@commontk.org">Ctk-developers@commontk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>+1 919 869 8849<br><br>
</div></div>