-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clickable text #7
Comments
You can use KDReports::HtmlElement to insert a <a href="...."> link, for instance to an HTTP URL, which will be opened with QDesktopServices::openUrl. You can see an example in the "ReferenceReport" example. Links to anchors, i.e. other sections of the same document aren't supported. It sounds like you want to catch this before it's sent to QDesktopServices though. At first sight, it looks like this would require a change in Qt (adding setOpenExternalLinks(bool) and a linkActivated() signal in QTextDocument, on top of the internal QTextControl which has this logic) and in KDReports (to call that API). This isn't on my immediate todo list for KDReports, but I can be hired to implement it :). Otherwise I'll be happy to review patches. |
Yeah may be like that, but my point was looked like what fast-report already did here https://www.fast-report.com/en/documentation/frx3progr/Working%20with%20TfrxReport%20component/Interactive%20reports.htm, when user click some text in preview dialog he could show messagebox or popping up another view report section. Hence, QTextDocument information would be lost, if I'm not wrong because QPrintPreviewWidget drawing stack was using qpainter drawXXX. Im not sure if re-implementing QPrintPreviewWidget using Graphicsview framework would be good idea. |
whether kdreport can take action to click on a particular section of text, so that we could listen on signal handler to trigger another form report view?
thanks
The text was updated successfully, but these errors were encountered: