Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
Cantor
Commits
829adb5c
Commit
829adb5c
authored
Jul 07, 2020
by
Shubham .
Browse files
Add code for creating the qt output help files(.qch,.qhc) as well
parent
b7c0eff6
Changes
2
Hide whitespace changes
Inline
Side-by-side
admin/documentation/Maxima/qthelp_generator.py
View file @
829adb5c
...
...
@@ -47,13 +47,15 @@ for fi in files:
fp
.
close
()
#####################
#open required files#
#####################
index
=
open
(
'./index.hhk'
,
'r'
)
# QtHelp files
qhp
=
open
(
'./help.qhp'
,
'w'
)
qhcp
=
open
(
'./help.qhcp'
,
'w'
)
#######################################
#code for generation of QtHelp files##
######################################
...
...
@@ -208,7 +210,7 @@ qhcp.writelines("""<?xml version="1.0" encoding="utf-8" ?>
# this way does not work, because somehow
beautifulsoup is unable to escape > and >< special symbols
# this way
to
does not work, because somehowbeautifulsoup
l
is unable to escape > and >< special symbols
# html = index.read()
# soup = BeautifulSoup(html, features='html.parser')
...
...
@@ -252,6 +254,12 @@ qhp.writelines("""</keywords>
</QtHelpProject> """
)
##############################################################
#qhp, qhcp input files are generate, now generate output files
#############################################################
stream
=
os
.
popen
(
'qhelpgenerator help.qhcp -o help.qhc'
)
index
.
close
()
qhp
.
close
()
qhcp
.
close
()
src/panelplugins/documentationpanel/documentationpanelwidget.cpp
View file @
829adb5c
...
...
@@ -122,6 +122,13 @@ void DocumentationPanelWidget::displayHelp(const QUrl& url)
m_textBrowser
->
setContent
(
contents
,
QLatin1String
(
"text/html;charset=UTF-8"
));
m_textBrowser
->
show
();
int
anchorPos
=
url
.
toString
().
indexOf
(
QLatin1Char
(
'#'
));
if
(
anchorPos
>=
0
)
{
QString
anchor
=
url
.
toString
().
mid
(
anchorPos
+
1
);
//m_textBrowser->page()->mainFrame()->scrollToAnchor(anchor);
}
qDebug
()
<<
url
;
const
QModelIndex
index
=
m_engine
->
indexWidget
()
->
currentIndex
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment