RPL Predefined Function Help in RiverWare [21] -- allow image overflow Bug Number: n/a Release notes (y/n): no (not yet) For Release Nums: 6.7 (1) Devised HTML CSS -- generated by the python script -- to prevent the image from imposing a minimum width on the containing element (typically, a table cell). See this example (image and HTML. For the latter, try making your browser window narrow): http://cadswes2.colorado.edu/~philw/2015/RplDoc/2015-03-10/OperatingHeadToMaxRelease.png http://cadswes2.colorado.edu/~philw/2015/RplDoc/2015-03-10/OperatingHeadToMaxRelease.html This accomplished by placing the image element in a DIV element with limited width and assigning the "show" to the image's overflow style, like this:
See the following python script code in function appendCloneChildren (targNode, srcNode): ... ... ... elif isImg: # In order to prevent the image from imposing a minimum width on the # content (typically inside a table cell, as are math formula images) # place the image inside a DIV element with limited width, but allow # the image to overflow its container. (The latter is done explicitly # even though "overflow:show" seems to be the default). # condNode.setAttribute ("style", "overflow:show;") imgWrapDiv = newDoc.createElement ("div") imgWrapDiv.setAttribute ("style", "width:10px;") imgWrapDiv.appendChild (condNode) targNode.appendChild (imgWrapDiv) (2) Solved the problem of the following error being reported to the console when calling QWebView::setHtml (const QString& html, const QUrl& baseUrl): "QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files" This was fixed by calling QUrl::setScheme(), as follows: _rplFuncDocBaseUrl = QUrl (embedHelpPath); _rplFuncDocBaseUrl.setScheme ("file"); ---