gyunaev / kchmviewer

kchmviewer is a CHM (Winhelp) files viewer written on Qt/KDE. It can be build as a standalone Qt-based application, or a KDE application. The main point of kchmviewer is compatibility with non-English chm files, including most international charsets.
http://www.ulduzsoft.com/linux/kchmviewer/
GNU General Public License v3.0
70 stars 18 forks source link

chm pages bad looking #18

Closed inuxor closed 3 years ago

inuxor commented 3 years ago

os : Manjaro unstable kchmviewer : 8.0

the Manjaro repo version can not open any chm file , same as in a closed issue https://github.com/gyunaev/kchmviewer/issues/10, so i compiled a copy ( qmake && make) this one can open chm file, but the pages looks like missing some css. in my memory there was a setting item in the 7.x versions, but the 8.0 can not do so.

how to work around? thank you.

u-235 commented 3 years ago

Hi.

I had the same problem with styles and scripts under the following conditions:

The easiest way to solve this problem is to use QWebKit instead of QWebEngine. To do this you need to make a patch in the src/src.pro file:

--- a/src/src.pro
+++ b/src/src.pro
@@ -109,7 +109,7 @@ LIBS += -lchm -lzip

 greaterThan(QT_MAJOR_VERSION, 4) {
     # Qt 5
-    greaterThan(QT_MINOR_VERSION, 5) {
+    greaterThan(QT_MINOR_VERSION, 17) {
         # Qt 5.6+
 #        error("You use Qt5.6+ - QWebEngine is not yet suitable for kchmviewer and is not supported")
         QT += webengine webenginewidgets

If you need to build an application with QtWebEngine try my fork.

inuxor commented 3 years ago

thank you @u-235 the problem is solved !