expose QDesktopServices::openUrl to python
Stefan Bund [Mon, 24 Jan 2011 23:26:31 +0000 (00:26 +0100)]
PythonPublisher.cc

index c6ad1fc..f944b6d 100644 (file)
@@ -13,6 +13,7 @@
 #include <iostream>
 #include <boost/python.hpp>
 #include "Publisher.hh"
+#include <QDesktopServices>
 
 //#include "PythonPublisher.mpp"
 #define prefix_
@@ -436,6 +437,8 @@ BOOST_PYTHON_MODULE(_pykit)
     py::class_<PublisherPyWrapper, boost::noncopyable>("Publisher")
         .def("publish", py::pure_virtual(&pykit::Publisher::publish))
         ;
+
+    py::def("openUrl", &QDesktopServices::openUrl);
 }
 
 PYTHON_EXTERN_MODULE(_httpapi);