[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] PyQt5==5.7.1 Missing libQt5QuickTest.so.5
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2017-03-16 12:06:00
Message-ID: 67AE0E4B-08A1-4E22-9066-EC82F62EEF3F () riverbankcomputing ! com
[Download RAW message or body]

On 14 Mar 2017, at 4:20 pm, Cody Scott <cody@perspexis.com> wrote:
> 
> The types defined in C++ need to be registered before calling QUICK_TEST_MAIN()
> 
> https://github.com/qt/qtquickcontrols/blob/5.8/src/controls/plugin.cpp#L159
> 
> Sorry if I don't understand your question.

If you look at what QUICK_TEST_MAIN expands to (a complete self contained main() \
function), there is no opportunity to register the types. The code you refer to is \
implemented in a plugin which (I assume) gets loaded by the internals of \
QUICK_TEST_MAIN. Plugins don't play well with Python - see the restrictions on using \
qmlscene.

I will look at how to test QML from Python in the future - but not at the moment \
(unless somebody has a bright idea).

Phil

> On Sat, Mar 11, 2017 at 1:59 PM, Phil Thompson <phil@riverbankcomputing.com> wrote:
> On 8 Mar 2017, at 4:53 pm, Cody Scott <cody@perspexis.com> wrote:
> > 
> > It seems that you can't do this. Qt handles QuickTest specially. It won't load \
> > the package if the program is not started via QUICK_TEST_MAIN. 
> > Is this something that PyQt5 is missing because there is no sip wrapper for \
> > QUICK_TEST_MAIN? 
> > Is there another way to run QML tests with a type registered in Python?
> 
> How does the C++ implementation of registered types get loaded when using \
> QUICK_TEST_MAIN? 
> Phil
> 

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic