how to send qml gui (as image) to qt-c++ ........because i want printing this gui ...please help me
why do open up a new thread instead of continuing the "old one":http://qt-project.org/forums/viewthread/28935/ ?
I already gave an answer there...what's unclear to you of this solution?
i can't understand your example...because i don't know where and how to send my qml gui (like hello.qml file) to this qt c++ function...
i have hello.qml gui
i have created Qdeclarative view for sending data to c++ function..
please see the mousearea function i have created onclicked finction,
in this onclicked function i want to send hello.qml to c++(print_pdf() function) ...this function is in c++)
note: this myObject is Qdeclarative element name
my question is in this onclicked function how to send this hellow.qml to print_pdf function
since you already use a QDeclarativeView (derives QWidget) use it in my example. DOnt print the qml-file, instead print the view that renders the qml-file:
if(printDialog.exec() == QDialog::Accepted)
or if you use Qt 5 you can use QPdfWriter [qt-project.org]: