Bonjour,
je cherche depuis plusieurs heure la solution à se nouveau problème...
Impossible d'afficher une page html dans mon QTextBrowser...
J'ai bien ma fenêtre qui s'ouvre tout marche bien, sauf que à l'intérieur du QTextBrowser il n'y a rien totalement vide...
Voici mon code :
Merci !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 void Tool::aide() { QDialog* fenAide = new QDialog; uiAide.setupUi(fenAide); path = QDir::convertSeparators(QCoreApplication::applicationDirPath()); QString imgPath = path+"\\doc"; QString imgPath2 = path+"\\doc\\images"; uiAide.textBrowser->setSearchPaths(QStringList()<<path<<imgPath<<imgPath2); uiAide.textBrowser->setSearchPaths(QStringList() << path+"\\doc\\index.html"); connect(uiAide.pushButton, SIGNAL(clicked()), this, SLOT(goHome())); connect(uiAide.pushButton_2, SIGNAL(clicked()), this, SLOT(Backward())); connect(uiAide.pushButton_3, SIGNAL(clicked()), this, SLOT(Forward())); fenAide->exec(); } void Tool::goHome() { uiAide.textBrowser->setSearchPaths(QStringList() << path+"\\doc\\index.html"); }
Partager