[Development] quickcontrols has now a hard dependancy on widgets.

Gunnar Roth gunnar.roth at gmx.de
Thu Apr 2 10:48:32 CEST 2015


Hello,
it has been quite some time since this thread, but yesterday i tried the approach using no_desktop just to find out, the the qtsvg imageformat plugin,
has ( of course) a dependency on qtsvg, which in turn does also depend on widgets.
Ok so i thought i use -no-widgets when configuring, but my wec 2013 build using qt 5.5 git failed. By the nature of the problem, i think a win32 build would have failed too.
Note: that i am dong shadow builds and no -developer-build
This modifications made the build compile:
--- a\qtbase\src\plugins\platforms\windows/accessible/iaccessible2.cpp    2015-03-12 15:49:39.698271300 +0100
+++ b\qtbase\src\plugins\platforms\windows/accessible/iaccessible2.cpp    2015-04-01 13:18:29.368083400 +0200
@@ -36,11 +36,11 @@
 #include "iaccessible2.h"
 #include "qwindowsaccessibility.h"
 #include <QtPlatformSupport/private/qaccessiblebridgeutils_p.h>
 #include <QtGui/qaccessible.h>
 #include <QtGui/qclipboard.h>
-#include <QtWidgets/qapplication.h>
+#include <QtGui/qguiapplication.h>
 #include <QtCore/qdebug.h>
 
 QT_BEGIN_NAMESPACE
 
--- a\qtbase\src\plugins\platforms\windows/accessible/qwindowsmsaaaccessible.cpp    2015-03-12 15:49:39.706271300 +0100
+++ b\qtbase\src\plugins\platforms\windows/accessible/qwindowsmsaaaccessible.cpp    2015-04-01 13:04:14.062083400 +0200
@@ -37,24 +37,21 @@
 #include "qwindowsmsaaaccessible.h"
 #include "qwindowsaccessibility.h"
 #include <oleacc.h>
 #include <servprov.h>
 #include <winuser.h>
 #include "comutils.h"
 
 #include <QtCore/qdebug.h>
 #include <QtCore/qmap.h>
 #include <QtCore/qpair.h>
 #include <QtCore/qsettings.h>
 #include <QtGui/qaccessible.h>
 #include <QtGui/qguiapplication.h>
 #include <qpa/qplatformnativeinterface.h>
 #include <QtGui/qwindow.h>
-#include <QtWidgets/qapplication.h>
-#include <QtWidgets/qgraphicsitem.h>
-#include <QtWidgets/qgraphicsview.h>
-#include <QtWidgets/qmessagebox.h>
+
 
 //#include <uiautomationcoreapi.h>
 #ifndef UiaRootObjectId
 #define UiaRootObjectId        -25
 #endif 

Regards,
Gunnar Roth



Gesendet: Mittwoch, 17. Dezember 2014 um 14:02 Uhr
Von: "deDietrich Gabriel" <Gabriel.deDietrich at theqtcompany.com>
An: "development at qt-project.org" <development at qt-project.org>
Cc: "Gunnar Roth" <gunnar.roth at gmx.de>, "gunnar at sletta.org" <gunnar at sletta.org>, "Nurmi J-P" <jpnurmi at theqtcompany.com>
Betreff: Re: Re: [Development] quickcontrols has now a hard dependancy on widgets.

Qt Quick Controls do depend on QtWidgets because of styling on desktop. This may be solved in the future as we plan on having separate plugins for styles. (Notice that Qt Quick Controls are not integral part of Qt Quick but a separate module.)
 
If you're writing an embedded app, then you most likely have a cross-built version of Qt (I'm assuming that's the case for WEC2013, of which I don't know much), and that version probably doesn't need widgets. So you can do as Gunnar S. proposed. Otherwise, your only solution, as I said earlier, is to build Qt Quick Controls with CONFIG += no_desktop. The only feature you'll miss by doing so is the desktop native-looking style, but that wouldn't make sense on WCE2013 either, AFAICT.
 

Best regards,
 
Dr. Gabriel de Dietrich
Senior Software Developer
The Qt Company — www.qt.io[http://www.qt.io]
 
------------------------------------------------------------

From: Gunnar Roth <gunnar.roth at gmx.de>
Sent: Tuesday, December 16, 2014 4:15 PM
To: gunnar at sletta.org
Cc: deDietrich Gabriel; development at qt-project.org
Subject: Aw: Re: [Development] quickcontrols has now a hard dependancy on widgets.
 

Well, i know that leaving out widgets from configure would also solve this problem ,but as i wrote i also need widgets in my build for other programs.
I just dont understand that i get widgets dependency by just using quickcontrols. And QtQuick does NOT depend on widgets as you say. I just look with depends.exe
and qt5quick does only depend on gui,qml,network and core. qml  does depend on network and core only.
 
Regards,
Gunnar (Roth)
 

Gesendet: Dienstag, 16. Dezember 2014 um 09:00 Uhr
Von: gunnar at sletta.org
An: "Gunnar Roth" <gunnar.roth at gmx.de>
Cc: Gabriel.deDietrich at theqtcompany.com, development at qt-project.org
Betreff: Re: [Development] quickcontrols has now a hard dependancy on widgets.
Configure qtbase with "-no-widgets" and all widget dependencies should be gone from both Qt Quick and from Controls.


--- gunnar.roth at gmx.de wrote:

From: "Gunnar Roth" <gunnar.roth at gmx.de>
To: "deDietrich Gabriel" <Gabriel.deDietrich at theqtcompany.com>
Cc: "development at qt-project.org" <development at qt-project.org>
Subject: Re: [Development] quickcontrols has now a hard dependancy on widgets.
Date: Mon, 15 Dec 2014 14:01:41 +0100



HI Gabriel,
I didn't know that, but i don't want any widgets dependency for a qml application, neither on desktop nor anywhere else.
 
Regards,
Gunnar
 
 

Gesendet: Montag, 15. Dezember 2014 um 12:04 Uhr
Von: "deDietrich Gabriel" <Gabriel.deDietrich at theqtcompany.com>
An: "Gunnar Roth" <gunnar.roth at gmx.de>, "development at qt-project.org" <development at qt-project.org>
Betreff: Re: [Development] quickcontrols has now a hard dependancy on widgets.
Hi Gunnar,

You can always rebuild QtQuick Controls making sure you add CONFIG += no_desktop in the .pro file. The widgets dependency is automatic if widgets are present except on mobile platforms (which, paradoxically, exclude embedded).

Best regards,

Dr. Gabriel de Dietrich
Senior Software Developer
The Qt Company — www.qt.io[http://www.qt.io][http://www.qt.io[http://www.qt.io]]


________________________________________
From: development-bounces+gabriel.dedietrich=theqtcompany.com at qt-project.org <development-bounces+gabriel.dedietrich=theqtcompany.com at qt-project.org> on behalf of Gunnar Roth <gunnar.roth at gmx.de>
Sent: Monday, December 15, 2014 10:07 AM
To: development at qt-project.org
Subject: [Development] quickcontrols has now a hard dependancy on widgets.

Hi,
Recently i deteced that quickcontrols plugim has started to add a hard dependency on widgets ( on wec2013 and win32 at least ).
dpends.exe is showing
??0QStyleHintReturnMask@@QAE at XZ
??0QStyleOption@@QAE at HH@Z
??0QStyleOptionButton@@QAE at XZ
??0QStyleOptionComboBox@@QAE at XZ
??0QStyleOptionFocusRect@@QAE at XZ
??0QStyleOptionFrame@@QAE at XZ
??0QStyleOptionGroupBox@@QAE at XZ
??0QStyleOptionHeader@@QAE at XZ
??0QStyleOptionMenuItem@@QAE at XZ
??0QStyleOptionProgressBar@@QAE at XZ
??0QStyleOptionSlider@@QAE at XZ
??0QStyleOptionSpinBox@@QAE at XZ
??0QStyleOptionTab@@QAE at XZ
??0QStyleOptionTabWidgetFrame@@QAE at XZ
??0QStyleOptionToolBar@@QAE at XZ
??0QStyleOptionToolButton@@QAE at XZ
??0QStyleOptionViewItem@@QAE at XZ
??1QStyleHintReturnMask@@QAE at XZ
??1QStyleOption@@QAE at XZ
??1QStyleOptionViewItem@@QAE at XZ
?font at QApplication@@SA?AVQFont@@XZ
?globalStrut at QApplication@@SA?AVQSize@@XZ
?hideText at QToolTip@@SAXXZ
?palette at QApplication@@SA?AVQPalette@@PBD at Z
?showText at QToolTip@@SAXABVQPoint@@ABVQString@@PAVQWidget@@@Z
?style at QApplication@@SAPAVQStyle@@XZ

as imported functions from Widgets library.

In contrast to this the quickcontrols dialog plugin has only a soft dependency via qpa, because of the possibility to use the widgets dialogs as a fallback.
Ir is very surprising to have a dependency on widgets, which loads this huge dll on our wec2013 platform into memory ( for performance reasons paging of exe/dll is switched off) . I admit that this does only happen if you also build widgets library, but i usually build as much a i can on a platform, even if i don't use it yet.

With this patch i now disable that dependency.
--- a\qtquickcontrols\src\src.pro 2014-12-05 17:24:10.000000000 +0100
+++ b\qtquickcontrols\src\src.pro 2014-12-08 13:45:54.616785600 +0100
@@ -7,6 +7,6 @@
SUBDIRS += layouts

SUBDIRS += dialogs
SUBDIRS += dialogs/Private

-qtHaveModule(quick):qtHaveModule(widgets): SUBDIRS += widgets
+#qtHaveModule(quick):qtHaveModule(widgets): SUBDIRS += widgets

I would really appreciate a configure option for this.

Regards,
Gunnar

_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development[http://lists.qt-project.org/mailman/listinfo/development][http://lists.qt-project.org/mailman/listinfo/development[http://lists.qt-project.org/mailman/listinfo/development]]
_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development[http://lists.qt-project.org/mailman/listinfo/development]

 



More information about the Development mailing list