Browse Source

Merge pull request #1153 from DonLakeFlyer/QQuickWidgetFix

Don't use native widget siblings
QGC4.4
Don Gagne 11 years ago
parent
commit
b8a79875af
  1. 18
      QGCExternalLibs.pri
  2. BIN
      files/images/px4/boards/px4fmu_2.x.png
  3. BIN
      files/images/splash.png
  4. 2
      src/QGCApplication.cc
  5. 1
      src/QGCQmlWidgetHolder.cpp
  6. 2
      src/VehicleSetup/SetupView.cc
  7. 1
      src/VehicleSetup/SetupViewConnected.qml
  8. 1
      src/VehicleSetup/SetupViewDisconnected.qml

18
QGCExternalLibs.pri

@ -166,14 +166,15 @@ OSGDependency { @@ -166,14 +166,15 @@ OSGDependency {
# [OPTIONAL] Google Earth dependency. Provides Google Earth view to supplement 2D map view.
# Only supported on Mac and Windows where Google Earth can be installed.
#
contains(DEFINES, DISABLE_GOOGLE_EARTH) {
GoogleEarthDisableOverride {
contains(DEFINES, DISABLE_GOOGLE_EARTH) {
message("Skipping support for Google Earth view (manual override from command line)")
DEFINES -= DISABLE_GOOGLE_EARTH
}
# Otherwise the user can still disable this feature in the user_config.pri file.
else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_GOOGLE_EARTH) {
}
# Otherwise the user can still disable this feature in the user_config.pri file.
else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_GOOGLE_EARTH) {
message("Skipping support for Google Earth view (manual override from user_config.pri)")
} else:MacBuild {
} else:MacBuild {
message("Including support for Google Earth view")
DEFINES += QGC_GOOGLE_EARTH_ENABLED
HEADERS += src/ui/map3D/QGCGoogleEarthView.h \
@ -183,7 +184,7 @@ else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_GOOGLE_EAR @@ -183,7 +184,7 @@ else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_GOOGLE_EAR
src/ui/map3D/QGCWebPage.cc \
src/ui/QGCWebView.cc
FORMS += src/ui/QGCWebView.ui
} else:WindowsBuild {
} else:WindowsBuild {
message("Including support for Google Earth view")
DEFINES += QGC_GOOGLE_EARTH_ENABLED
HEADERS += src/ui/map3D/QGCGoogleEarthView.h \
@ -194,8 +195,11 @@ else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_GOOGLE_EAR @@ -194,8 +195,11 @@ else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_GOOGLE_EAR
src/ui/QGCWebView.cc
FORMS += src/ui/QGCWebView.ui
QT += axcontainer
} else {
} else {
message("Skipping support for Google Earth view (unsupported platform)")
}
} else {
message("Skipping support for Google Earth due to Issue 1157")
}
#

BIN
files/images/px4/boards/px4fmu_2.x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 KiB

After

Width:  |  Height:  |  Size: 202 KiB

BIN
files/images/splash.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 18 KiB

2
src/QGCApplication.cc

@ -97,6 +97,8 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) : @@ -97,6 +97,8 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) :
Q_ASSERT(_app == NULL);
_app = this;
// This prevents usage of QQuickWidget to fail since it doesn't support native widget siblings
setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
#ifdef QT_DEBUG
// First thing we want to do is set up the qtlogging.ini file. If it doesn't already exist we copy

1
src/QGCQmlWidgetHolder.cpp

@ -30,6 +30,7 @@ QGCQmlWidgetHolder::QGCQmlWidgetHolder(QWidget *parent) : @@ -30,6 +30,7 @@ QGCQmlWidgetHolder::QGCQmlWidgetHolder(QWidget *parent) :
QWidget(parent)
{
_ui.setupUi(this);
_ui.qmlWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
}
QGCQmlWidgetHolder::~QGCQmlWidgetHolder()

2
src/VehicleSetup/SetupView.cc

@ -49,6 +49,8 @@ SetupView::SetupView(QWidget* parent) : @@ -49,6 +49,8 @@ SetupView::SetupView(QWidget* parent) :
Q_UNUSED(fSucceeded);
Q_ASSERT(fSucceeded);
setResizeMode(SizeRootObjectToView);
_setActiveUAS(NULL);
}

1
src/VehicleSetup/SetupViewConnected.qml

@ -9,7 +9,6 @@ Rectangle { @@ -9,7 +9,6 @@ Rectangle {
id: topLevel
objectName: "topLevel"
anchors.fill: parent
color: palette.window
signal buttonClicked(variant component);

1
src/VehicleSetup/SetupViewDisconnected.qml

@ -6,7 +6,6 @@ import QGroundControl.FactSystem 1.0 @@ -6,7 +6,6 @@ import QGroundControl.FactSystem 1.0
Rectangle {
QGCPalette { id: palette; colorGroup: QGCPalette.Active }
anchors.fill: parent
color: palette.window
Item {

Loading…
Cancel
Save