FlatWoken | Official FlatWoken icon theme source repository | Icon library
kandi X-RAY | FlatWoken Summary
kandi X-RAY | FlatWoken Summary
Official FlatWoken icon theme source repository.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of FlatWoken
FlatWoken Key Features
FlatWoken Examples and Code Snippets
Community Discussions
Trending Discussions on FlatWoken
QUESTION
I'm trying to generate a pdf using Qt5 under Windows. My document contains texts, images and charts. As I'm familiar with Qt and Qwt, I believed the best strategy was to create a QWidget
with my document layout and simply print it. But I face problems and could not end up with an acceptable result.
Here is my MCVE, a simple page document with:
- A header with title and image
- A piece of text
- A simple chart
Based on Qt document and How can I print a QWidget in Qt?, I ended up with this code:
main.cpp:
...ANSWER
Answered 2017-Dec-19 at 07:46Personally I would strongly consider creating the content as a QTextDocument and then printing it. You can (IIRC, haven't used QwtPlot in a while) render the charts to images. Then it is easy to add the image to the document wherever you want. Same with your static image(s), of course. You can use HTML/CSS in the document (despite "Text" in the class name), and lots of other options.
Example added on request:
This is going to be very simplified and not fully formed, but hope it helps...
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install FlatWoken
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page