PDA

View Full Version : Qt Assistant Assistant won't display short htmls. Why? Is that a bug?



Raadush
23rd October 2012, 13:23
Hi. Came across strange issue. I have html page, created .qhp, .qch, .qhcp and .qhc files as usuall, but Assistant haven't displayed that page when I cliced on corresponding leaf in tree structure of assistant. After further testing where the problem could be, I figured out, that the problem is in length of html page. This test page:



<html>
<h1>Test</h1>
Test
</html>


will not get displayed. Neither this one:



<html>
<h1>Test</h1>
TestTestTestTestTestTestTestTestTestTestTestTestTe stTestTestTestTestTestTestTestTestTest
TestTestTestTestTestTestTestTestTestTestTestTestTe stTestTestTestTestTestTestTestTestTest
TestTestTestTestTestTestTestTestTestTestTestTestTe stTestTestTestTestTestTestTestTestTest
TestTestTestTestTestTestTestTestTestTestTestTestTe stTestTestTestTestTestTestTestTestTest
TestTestTestTestTestTestTestTestTestTestTestTestTe stTestTestTestTestTestTestTestTestTest
TestTestTestTestTestTestTestTestTest
</html>


But after adding another character behind last "Test" the page is suddently displayed correctly. Anybody have some idea why is that? Is that a bug? I want to create really short help page telling what happens when user click Exit in my app.

wysota
23rd October 2012, 15:22
What happens if you wrap the content in <body> tags?

Raadush
24th October 2012, 07:00
The same thing. Only shortens page content which causes the error a bit



<html>
<body>
<h1>Test</h1>
TestTestTestTestTestTestTestTestTestTestTestTestTe stTestTestTestTestTestTestTestTestTest
TestTestTestTestTestTestTestTestTestTestTestTestTe stTestTestTestTestTestTestTestTestTest
TestTestTestTestTestTestTestTestTestTestTestTestTe stTestTestTestTestTestTestTestTestTest
TestTestTestTestTestTestTestTestTestTestTestTestTe stTestTestTestTestTestTestTestTestTest
TestTestTestTestTestTestTestTestTestTestTestTestTe stTestTestTestTestTestTestTestTestTest
TestTestTestTestTestT
</body>
</html>


not being displayed, +1 character displayed correctly

Raadush
26th October 2012, 07:20
So? Anyone some advice? Or there's nothing to be done?

Raadush
30th October 2012, 07:17
Still anyone? :( Besides of this strange behavior, I found very hard to make assistant do what I want to do.

wysota
30th October 2012, 09:01
Are you using the webkit backend for assistant or the text browser backend?

Raadush
31st October 2012, 08:36
Neither one? Im using set of html pages on hard-drive loaded via <files></files> element in help.qhp file. Doing nothing programatically with anything so far, just calling assistant from terminal

wysota
31st October 2012, 09:46
Neither one?
You have to be using one of the two :) My question is about how your assistantclient library was compiled. See if it depends on webkit or not.

Raadush
31st October 2012, 14:10
Yes, depends on libQtWebKit

wysota
31st October 2012, 14:53
Does it work if you display the same content on QWebView?

Raadush
1st November 2012, 08:30
Created:


QWebView view;
QFile file("test.htm");
file.open(QIODevice::ReadOnly | QIODevice::Text);
QString string = file.readAll();
file.close();
view.setHtml(string);
view.show();


with test.htm looking:



<html>
<body>
<h1>Test</h1>
T
</body>
</html>


Everything looks fine, QWebView displayed page correctly