Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RGeomViewerWidget.cpp
Go to the documentation of this file.
1// Author: Sergey Linev, GSI 13/01/2021
2
3/*************************************************************************
4 * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
13#include "RGeomViewerWidget.h"
14
16{
17 setObjectName( "RGeomViewerWidget");
18
19 setSizeIncrement( QSize( 100, 100 ) );
20
21 setUpdatesEnabled( true );
22 setMouseTracking(true);
23
24 setFocusPolicy( Qt::TabFocus );
25 setCursor( Qt::CrossCursor );
26
27 setAcceptDrops(true);
28
29 fGeomViewer = std::make_shared<ROOT::Experimental::REveGeomViewer>();
30
31 fGeomViewer->SetShowHierarchy(false);
32
34
35 fGeomViewer->Show(where);
36
37 fView = findChild<QWebEngineView*>("RootWebView");
38 if (!fView) {
39 printf("FAIL TO FIND QWebEngineView - ROOT Qt5Web plugin does not work properly !!!!!\n");
40 exit(11);
41 }
42
43 fView->resize(width(), height());
44}
45
47{
48}
49
50void RGeomViewerWidget::resizeEvent(QResizeEvent *event)
51{
52 fView->resize(width(), height());
53}
include TDocParser_001 C image html pict1_TDocParser_001 png width
void resizeEvent(QResizeEvent *event) override
QWebEngineView * fView
qt webwidget to show
RGeomViewerWidget(QWidget *parent=nullptr)
std::shared_ptr< ROOT::Experimental::REveGeomViewer > fGeomViewer
static std::string GetQt5EmbedQualifier(const void *qparent, const std::string &urlopt="")
returns string which can be used as argument in RWebWindow::Show() method to display web window in pr...