[Qt-interest] remove border and scrollbars from Microsoft Web Browser ActiveX control
Michael Schneider
mschneider at voiceinterconnect.de
Thu Feb 18 16:51:35 CET 2010
I found a workaround via css but its still not satisfying:
<style type="text/css">
body {
overflow:hidden;
border:0px solid #000000;
}
</style>
still hoping that there will be a better solution
Michael
> Hi!
>
> I want to remove the border and the scrollbars from the webbrowser
> widget. When I navigate first time after application start to a website
> there show up scrollbars and borders.
>
> Here you can see my program. Below I am writing what I have tried
> already.
> ###############################
> ui file:
> ...
> <widget class="WebAxWidget" name="webbrowser" native="true">
> <property name="geometry">
> <rect>
> <x>200</x>
> <y>40</y>
> <width>561</width>
> <height>541</height>
> </rect>
> </property>
> <property name="control" stdset="0">
> <string>{8856F961-340A-11D0-A96B-00C04FD705A2}</string>
> </property>
> </widget>
> ...
> <customwidget>
> <class>WebAxWidget</class>
> <extends>QWidget</extends>
> <header location="global">webaxwidget.h</header>
> </customwidget>
> ...
> ########################################
> webaxwidget.h:
> ...
> #include <ActiveQt/QAxWidget>
> #include "windows.h"
> class WebAxWidget : public QAxWidget
> {
> public:
> WebAxWidget(QWidget* parent = 0, Qt::WindowFlags f = 0) :
> QAxWidget(parent, f)
> {
> }
> ...
> #########################################
> cpp-file:
> ...
> ui->webbrowser->dynamicCall("Navigate(\"some_website\")");
> ...
> ###########################################
> ###########################################
> I have read the supported properties through propertyBag().
>
> QMap<QString, QVariant> a;
> a = ui->webbrowser->propertyBag();
> QMap<QString, QVariant>::iterator it;
> for (it = a.begin(); it != a.end(); ++it)
> ui->lineEdit_2->setText(ui->lineEdit_2->text()+"| "+it.key());
>
> output: | AlignLeft| AutoArrange| ExtentX| ExtentY| HideFileNames|
> Location| NoClientEdge| NoFolders| NoWebView| Offline|
> RegisterAsBrowser| RegisterAsDropTarget| Silent| SingleClick|
> SingleSelection| Transparent| ViewID| ViewMode
>
> Then I tried to set NoClientEdge:
> ui->webbrowser->setProperty("NoClientEdge",true);
> But setProperty returns false.
>
> I also tried to set NoClientEdge with dynamicCall():
> ui->webbrowser->dynamicCall("NoClientEdge",true);
> But in Application output windows shows up this message:
> QAxBase::dynamicCallHelper: NoClientEdge: No such property in
> {8856F961-340A-11D0-A96B-00C04FD705A2} [Microsoft Web Browser]
>
> I hope someone can help me with the borders or the scrollbars. Some idea
> is good as well. Or maybe I made a mistake...
> Thank You.
> Michael
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list