Re: [Interest] The willy-nilly deletion of convenience,, methods

2021-03-24 Thread Ulf Hermann
On 3/24/21 2:21 PM, Christian Gagneraud wrote: On Thu, 25 Mar 2021 at 01:22, Roland Hughes wrote: You forgot customer abandonment death of OpenSource LTS Qt 6 being useless QML needing to be ripped out. Is there life on Mars? I'm from Mars. ___

Re: [Interest] Extracting available imports from QML plugins for package dependencies

2021-03-26 Thread Ulf Hermann
Hi Fabian, In general, you should bug your upstream to provide a qmltypes file for each module. They know best what types they want to expose in what version and under what URI. I do understand that upstream may be less than delighted, though ... Modern QML applications generate their qmltyp

Re: [Interest] QtQuickCompiler and QtQuickControls2

2021-03-29 Thread Ulf Hermann
Hi, We've recently added the "prefer" directive to the qmldir format. With it you can specify a preferred location for QML files to be loaded from. Usually this will be in the resource file system. Files in the resource file system can be pre-compiled with qmlcachegen. Therefore, during deve

Re: [Interest] Guide me through the Qt offerings for GUIs

2021-04-25 Thread Ulf Hermann
One thing I noticed contributing to this effect is that it is apparently difficult to pass objects of "medium" complexity through the glue layer > Simple stuff like integers and strings are fine (enums already get interesting...), really complex stuff like QAbstractItemModels can be fine, but for

Re: [Interest] Guide me through the Qt offerings for GUIs

2021-04-25 Thread Ulf Hermann
You know that I do appreciate your work to make QML easier to use. However, I am still not convinced that a custom language (especially one that does not fit _that_ seamlessly to C++) is needed at all. Well, that's the main point then. Any language that does the object composition in a simpler

Re: [Interest] Porting custom QML plugin to the Qt6

2021-04-28 Thread Ulf Hermann
Hi Jakub, nice to hear someone is trying the fancy new QML type registration! [...] I spotted, I believe, the most important changes. QQmlExtensionPlugin being changed to QmlEngineExtensionPlugin, QML_ELEMENT added in Qt 5.15.X and removal of QQmlExtensionPlugin::registerTypes. Technically,

Re: [Interest] L Word

2021-04-30 Thread Ulf Hermann
If I came from Mars that still wouldn't give me the right to abuse, insult or demean other people on this list. You clearly did not read the secret Martian amendment to the code of conduct. Roland has. We're neighbors. Anyway, the amount of popcorn I have ingested reading this list tells me

Re: [Interest] QML Singleton and QTimer?

2021-05-10 Thread Ulf Hermann
Hi, GuiApplication::GuiApplication(int argc, char*argv[]): QGuiApplication::QGuiApplication(argc, argv) { m_hardwareInterface = new HardwareInterface; qmlRegisterSingletonInstance("com.company", 1, 0, "HardwareInterface", m_hardwareInterface); } qmlRegisterSingletonIns

Re: [Interest] (Q)Plugins and QML/Quick

2021-09-13 Thread Ulf Hermann
Hi, The problem to discuss: * An application that wants to be extendable via plugins. * These are found and loaded at runtime. * Not all of them are used at the time. * The plugins require non-trivial UI, that they ought to "bring themselves". * During the runtime of the applicati

Re: [Interest] (Q)Plugins and QML/Quick

2021-09-14 Thread Ulf Hermann
Maybe I missed something, but this seems more like a solution to manage QML resources and modules that you know about at compile time. The QML import path allows you to combine modules compiled separately in the context of different projects. I'm talking about a runtime problem. Lemme try to

Re: [Interest] (Q)Plugins and QML/Quick

2021-09-14 Thread Ulf Hermann
But my goal is to not know about the types beforehand at all. It's basically the "copy the dll to the application folder and it'll magically show up as an option" pattern. The goal is to provide an extensibility framework, like eclipse, or web browser addons. Not just using a type defined elsew

Re: [Interest] Qt 5.15 LTS vs Qt 6.2 LTS

2021-09-30 Thread Ulf Hermann
As of last month, 1.26% of all laptops and desktop computers worldwide were still running on the 19-year-old OS. That’s a greater proportion than much younger operating systems Windows 8 (0.57%), ChromeOS (0.42%) and Windows Vista (0.12%). The only thing one has to do to keep these systems "secu

Re: [Interest] Qt 5.15 LTS vs Qt 6.2 LTS

2021-09-30 Thread Ulf Hermann
Long story short: You can have a Qt 5.15 LTS. You just have to pay for it. You can even have Qt supported on obscure outdated platforms, as Volker mentioned. It's just even more expensive. The price is high because there is a lot work involved in making this happen and the number of customers r

Re: [Interest] Qt 5.15 LTS vs Qt 6.2 LTS

2021-10-01 Thread Ulf Hermann
I doubt you get a paid-for 5.15 LTS under an Open Source licence, so no, this is not comparable a̲t̲ ̲a̲l̲l̲. I did not compare to anything. Roland listed a number of open source projects with LTS versions _after_ I wrote this. If you want to discuss the issue of "I want a supported open sour

Re: [Interest] Qt 5.15 LTS vs Qt 6.2 LTS

2021-10-02 Thread Ulf Hermann
There are no patient killing bugs in the underlying OS or the previously used drivers. Those only exist in the new drivers, new OS patches and new Qt code. All of the new code has to be written following 62304 SDLC Although I doubt that Windows XP or the new graphics drivers are free of patien

Re: [Interest] Can QML compiler optimize switch into array indexing?

2021-10-14 Thread Ulf Hermann
Hi, Let's look at the QML snippet again: enabledBorders: { switch (control.edge) { case Qt.BottomEdge: return PlasmaCore.FrameSvgItem.TopBorder; case Qt.RightEdge: return PlasmaCore.FrameSvgItem.LeftBorder; case Qt.To

Re: [Interest] Can QML compiler optimize switch into array indexing?

2021-10-15 Thread Ulf Hermann
I now saw your nice blog post about this at [1], saying "You should not call qmlRegisterType() and friends procedurally anymore.". I then saw that there's no pointer in the docs for qmlRegisterType and friends [2] to QML_ELEMENT. There are quite a few links from the qmlRegisterType() family of

Re: [Interest] Binding::restoreMode buyers guide

2021-10-21 Thread Ulf Hermann
The question is all about QtQml 2.15 Binding type. The infamous missing unexported `restoreMode` property sure makes our lifes slightly harder than it should be (by generating warnings if left out); but when it comes to choosing an appropriate value for it -- I am totally lost. The short story i

Re: [Interest] QML type hints and their problems

2021-11-03 Thread Ulf Hermann
a, Use type annotations on all JavaScript functions in QML files. Period. It helps tooling, gives you better diagnostics from qmllint and qmlsc, helps you understand your code better. There are no downsides. b, In this particular case we could be more lenient, but what if that was actually an

Re: [Interest] Javascript: regex: no /s flag support?

2021-11-25 Thread Ulf Hermann
On Thursday, November 25, 2021 11:47:19 PM MSK Alexander Dyagilev wrote: I'm trying to: var re = new RegExp('someregex', 's'); This does not produce a QRegularExpression but rather a JavaScript regular expression. Unfortunately those are slightly different. See https://developer.mozilla.org/

Re: [Interest] Javascript: regex: no /s flag support?

2021-11-25 Thread Ulf Hermann
And the 's' flag was apparently added in ES2018, which QML does not support, yet. best, Ulf ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest

Re: [Interest] [Qt6] QML_ATTACHED failing with ::QQmlPrivate not declared

2022-01-03 Thread Ulf Hermann
So, did I stumble on a bug? Indeed that sounds wrong. You should not need to include qqmlprivate.h manually. We've moved the registration macros from qqml.h to qqmlregistration.h, but apparently not all their dependencies. Including qqml.h instead of qqmlregistration.h should work. best reg

Re: [Interest] [Qt6] QML_ATTACHED failing with ::QQmlPrivate not declared

2022-01-03 Thread Ulf Hermann
https://codereview.qt-project.org/c/qt/qtdeclarative/+/383175 may have fixed this. It forward declares some of the types. best regards, Ulf ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest

Re: [Interest] [Qt6] QML_ATTACHED failing with ::QQmlPrivate not declared

2022-01-05 Thread Ulf Hermann
On a side note, I was wondering, why these, contrary to other Qt headers, don't provide cpp style naming? Where do you see the lack in cpp style naming? What name is wrong? best regards, Ulf ___ Interest mailing list Interest@qt-project.org https://li

Re: [Interest] [Qt6] QML_ATTACHED failing with ::QQmlPrivate not declared

2022-01-05 Thread Ulf Hermann
I didn't mean the name's wrong, simply that I read in the docs instead of or something akin. would import a class called "QQmlRegistration". There is no such class in that header. It's a collection of macros. The correct form is . best regards, Ulf ___

Re: [Interest] [Qt6] Gadgets in QML

2022-01-06 Thread Ulf Hermann
To be frank it's been an annoyance for me that gadgets can't be instantiated the same way the QObject can within the QML document/tree. Is there a good reason to disallow this or is it simply not implemented? Am I missing some odd use/corner case why it's not a good idea? It's not implemented

Re: [Interest] [Qt6] Gadgets in QML

2022-01-06 Thread Ulf Hermann
Yeah, but my beef with it is that I must derive from QObject for that, don't I? I can live with not having notifications for the fields, is what I mean. font is explicitly _not_ derived from QObject. That's the whole point of value types. Value types, however, cannot exist as root objects. The

Re: [Interest] [Qt6] Gadgets in QML

2022-01-06 Thread Ulf Hermann
Person is a `QObject`, the `Age` is a gadget I've exposed from C++. Then it's easy. If the "age" property is declared in C++, already today you can do the following (just like with font): property var person: Person { age { years: 12 months: 4 } Simulation.onAdvan

Re: [Interest] [Qt6] Gadgets in QML

2022-01-07 Thread Ulf Hermann
Well, it does work, albeit I'm not convinced if it's better/efficient enough. In any case, if you're interested we can pick up on gerrit, just say so. Sure, if you have something on gerrit let me see! However, value types with upper case names is something I probably won't allow. All our exis

Re: [Interest] [Qt6] QML automatic type registration in a (shared) library

2022-01-14 Thread Ulf Hermann
Is the place where the module's qmldir ends up reachable via the QML import path? If you're linking the library into the application, you may just add :/ to your import path so that it's loaded from the qrc file system right away. Be aware that some linkers just drop the linkage if they perceiv

Re: [Interest] [Qt6] QML automatic type registration in a (shared) library

2022-01-14 Thread Ulf Hermann
Otherwise, if the module ends up in C:/foo/bar/Tsc/Ui/, then you need to add C:/foo/bar/ to the import path. Well, unless your executable is in C:/boo/bar. Then you don't need to do anything. But apparently that's not the case. The executable would be at the root of the application-specific

Re: [Interest] [Qt6] QML automatic type registration in a (shared) library

2022-01-14 Thread Ulf Hermann
I don't know. I have the generated qmldir in the C:\Programming\tsc\build\debug\TscUi directory, which I think should be correct. I haven't messed with the output paths at all. The application goes to a neighboring directory in C:\Programming\tsc\build\debug\TscApp Well, no, that doesn't work.

Re: [Interest] [Qt6] QML automatic type registration in a (shared) library

2022-01-14 Thread Ulf Hermann
Perhaps that's how it's supposed to work, but I'm not intending to mess around with the target output paths in cmake. It simply makes no sense to me. If you want the QML engine to find your module, you need to follow certain conventions around the paths. You can create a separate CMake targe

Re: [Interest] [Qt6] QML automatic type registration in a (shared) library

2022-01-14 Thread Ulf Hermann
In my case to make extra sure I exported a dummy global symbol from the dll. If I don't do anything with it - nothing works. If I print it with qDebug() in the application code, the library is loaded and registration code and all works just as expected. Indeed. And instead of the dummy symbol

Re: [Interest] [Qt6] Inject a QML enum from C++ at runtime

2022-01-20 Thread Ulf Hermann
I imagine I'm not supposed to do such stuff, but is it at all possible to provide a QML enumerator at runtime from C++? Why does it have to be an enumerator? To me it sounds like the values should be properties of a singleton. The code accessing them needs to know a fixed set of names after al

Re: [Interest] [Qt6] Inject a QML enum from C++ at runtime

2022-01-20 Thread Ulf Hermann
Well, the number of names isn't fixed is the point - they're loaded at runtime and will change (increase) from time to time. Then an enumerator won't really help you. The point of an enumerator is that each entry is a constant. If the names and values can change at runtime, you should use a

Re: [Interest] [Qt6] QML notify dynamic property changes from C++

2022-03-07 Thread Ulf Hermann
Hi Konstantin, I have exposed some dynamic properties through QQmlPropertyMap to the QML engine and that works well. However I need to change the values from C++ and want to notify the bindings about the property change from there. Is there a way to do it? QQmlPropertyMap::setValue(key, valu

Re: [Interest] [Qt6] QML notify dynamic property changes from C++

2022-03-07 Thread Ulf Hermann
Hi, Do you possibly mean QQmlPropertyMap::updateValue, because I don't see a setValue method in the documentation. Either way it doesn't appear to Sorry, it's called: void insert(const QString &key, const QVariant &value); Gadgets cannot send signals or notify about property changes in any

Re: [Interest] [Qt6] QML notify dynamic property changes from C++

2022-03-07 Thread Ulf Hermann
On a related note, I'd suggest including an iterator/const_iterator for the QQmlPropertyMap for convenience, and also it could possibly handle this sort of value change in a more streamlined manner. QQmlPropertyMap is not our focus for new features. It's most important downside is that we cann

Re: [Interest] QML issues after deployment

2022-04-26 Thread Ulf Hermann
Hi, just lately I started integrating QML features into my Qt6 app (related to web browsing). This works fine so far, however, after deployment via macdeployqt I receive this error upon bootup: module "QtQml.WorkerScript" is not installed There can be many reasons for this. The most likely on

Re: [Interest] Support for Qt 5 & Qt 6 in QML app

2022-05-13 Thread Ulf Hermann
Hi, I need to migrate a Qt 5 application with QML ui to Qt 6 without losing Qt 5 support. What is the best approach here? Version-specific resources? File selectors (by the way is it even possible to select QML files based on the Qt version?) I mean it is clear that platform-specific code/import

Re: [Interest] QML required property in view delegate - bug?

2022-05-13 Thread Ulf Hermann
Which raises the error "ReferenceError: model is not defined", as documented. Is there a way around this? Just add the the "noise" property as another required one and don't access "model" in the delegate. You can do that where you assign to the "text" property. This way it doesn't require you

Re: [Interest] QML required property in view delegate - bug?

2022-05-13 Thread Ulf Hermann
I agree with the doc for the "first level" of properties, but is it also by design even if the required properties are in a sub item, as in my 2nd example (where the delegate itself doesn't have any required properties)? It is this case that seems a bug to me. Indeed that is a bug. Thanks for

Re: [Interest] Qt 5 -> 6: In QQmlEngine, Qt.Checked, etc. are no longer available

2022-06-23 Thread Ulf Hermann
Thanks for pointing this out! .import QtQml 2.15 as CoreQML console.log(CoreQML.Qt.Checked) yields: At line 2: ReferenceError: CoreQML is not defined Is that something I should report as a bug? I'd appreciate any other potential workarounds. The .import dance as shown above

Re: [Interest] Qt 5 -> 6: In QQmlEngine, Qt.Checked, etc. are no longer available

2022-06-24 Thread Ulf Hermann
This is very promising, but unfortunately I could only get it to work with QJSEngine and not with QQmlEngine. With the latter, the Qt object stubbornly still only provides various functions. Indeed, in QQmlEngine the global object is frozen. You cannot replace its properties. Apparently you can

Re: [Interest] Qt 5 -> 6: In QQmlEngine, Qt.Checked, etc. are no longer available

2022-06-24 Thread Ulf Hermann
Right, normally when evaluating a script, any error can be caught and reported however you wish, but this does not work when the script execution is trigger through a signal connection. In this case, when using QJSEngine, errors are always printed to the standard out, whereas the QQmlEngine all

Re: [Interest] Small survey on necessary Qt Container size

2022-09-27 Thread Ulf Hermann
I think Andre's point is that you should not use Qt containers for such large amounts of data, but rather some other data structure better suited for your case (most trivially, std::vector instead of QList). The implicit sharing of Qt containers is a nice trait that enables you to write more c

Re: [Interest] "Proper" Date Locale support?

2016-06-07 Thread Ulf Hermann
I'm working with localization of dates. There is a standard JS API: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString#Using_options But QML defines it's own Date: http://doc.qt.io/qt-5/qml-qtqml-date.html The difference being the MDN refers to

Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Ulf Hermann
QJSValue result = qmlEngine.evaluate(item.m_expression.sourceCode()); I guess you are mostly profiling the JIT compiling, not the actual evaluation. In order to get realistic results you should keep the compiled representation of the expression around, e.g. as a JS function. From the docs: Q

Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Ulf Hermann
The usage scenario fits my needs, that is the reason to evaluate exactly this way. I mean - should the QScriptEngine be deprecated, the QQmlEngine/QJSEngine should also have ways to utilize some form of JIT/preparse. Even in the first pass where JIT cannot be effective (or when I parse just

Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Ulf Hermann
QJSEngine does not cache the compilation results if you just pass in plain strings. I also don't think QScriptEngine can do this here (but I haven't checked). QScriptEngine might be clever enough to automatically use the interpreter rather than JIT-compiling such small expressions. You can se

Re: [Interest] QT plugins memory footprint and the debugger

2016-11-10 Thread Ulf Hermann
Looking at the source of qt, the problem is identical(though it is protected against runaway exceptions). The MinGw debug plugins of qtquick are quite large and use the same mechanism to load plugins. If, as in my case, the initialization of the program allocates considerable memory ( but tbh

Re: [Interest] SCXML Statemachine donedata event

2016-11-28 Thread Ulf Hermann
Connections|{| ||target|: stateMachine| |onEventOccurred: {| |console.|log|(event.name)| |}| |}| From QML you should use the EventConnection QML type. About like this: EventConnection { stateMachine: stateMachine events: ["done.state.*"] // or ["done.state.somespecificst

Re: [Interest] SCXML editor in QtCreator

2016-11-29 Thread Ulf Hermann
Hello Wolf, Thanks for trying the SCXML editor. Your feedback is appreciated. I have tried out the SCXML editor plugin for the QtCreator. My first impression is very positive. The editor creates nicely looking state chart diagrams. There are only two downsides I have found so far: 1. Events ar

Re: [Interest] QML Debug API

2018-11-09 Thread Ulf Hermann
Hi Nils, > I have read that QML offers a binary debug protocol that is used by > several tools to to gain insights into QML applications. I read about > this interface here: http://doc.qt.io/qt-5/qtquick-debugging.html > It is stated that: "The Qt QML module provides services for debugging, > i

Re: [Interest] Changes to Javascript runtime in 5.12

2019-01-03 Thread Ulf Hermann
Hi René, > In JS libs before 5.12, I've always used a closure approach to not > leak a bunch of private variables onto the global module object. This > results in a layout much like so: > > (function(lib) { > ... closed vars can be declared here ... > > lib.bar = function() { > return "b

Re: [Interest] Overriding list properties in QML at initialisation

2019-08-14 Thread Ulf Hermann
Hello, > If I create a class with a QQmlListProperty and then initialise it with > an array in some QML file, then subclass the QML type in a second QML > file and try to override the array there, when creating an instance of > the child class, the list contains the arrays concatenated instead

Re: [Interest] QML and sensitive data

2019-09-05 Thread Ulf Hermann
> Cheap hack #1: assign both fields new values once validated, say "*" > and force screen update before navigating away. No. Strings are immutable in QML (and JavaScript). The old string will still be in memory at that point. And no, it's not a QString. const-casting and overwriting from C+

Re: [Interest] QML and sensitive data

2019-09-09 Thread Ulf Hermann
Hi, > Just in case if someone will be looking for solution - I've managed to > eliminate all the sensitive data from memory on closing particular QML > screen without sacrificing existing architecture. The secret is pretty > simple: just avoid situations when QString-s gets copied into JS > string

Re: [Interest] Binding based on typeof doesn't work any more

2019-10-17 Thread Ulf Hermann
> But still: Why has the behavior been (apparently) changed at all in the > first place? Or is it a bug after all? It does sound like a bug. Can you please open a bug report at https://bugreports.qt.io ? I would like to know * What is the last version of Qt your example worked correctly with?

Re: [Interest] Stepping into Qt sources (Qt 5.14, MinGW 64-bit)

2020-01-27 Thread Ulf Hermann
> Stepping into -O2 builds (-O3 for QtCore and QtGui) is painful at best. The > debug information we provide is not usable for more than getting backtraces to > help the developer solving issues. Stepping into optimized builds is kind of an annoyance but, at least for me, it is much less of a pai

Re: [Interest] QML property lint suggestion

2020-02-17 Thread Ulf Hermann
> I'm here watching Ulf's QtWS19 QML talk and had a thought... I might > be dumb or crazy (either are equally likely) but, the other day I > added a property called 'data' and completely broke my application. > It was to store data I received. However QML also declares a property > 'data' which is

Re: [Interest] Will Qt6 end this enum issue? (or even 5.15?)

2020-03-20 Thread Ulf Hermann
Hi Jason, you should open or find an existing bug report that describes your problem and notify me about it. Then we have a more persistent place to discuss this, and someone might feel inclined to fix it. Also, I'm always happy to accept patches and I can give advice on how to navigate the c

Re: [Interest] How to set a QJSValue with functions as a context property in QQmlContext?

2020-04-15 Thread Ulf Hermann
Is there a way to set a QJSValue as a context property in QQmlContext and retain function properties? You should not do this. Context properties are invisible to any tooling or static analysis of your QML code and add significant complication to the name lookup logic. The fact that you can inj

Re: [Interest] How to set a QJSValue with functions as a context property in QQmlContext?

2020-04-15 Thread Ulf Hermann
I am not loading QML documents at all nor do I need QML tooling here. This is pure JS. I have a bunch of JS code snippets to evaluate. The snippets expect certain properties to exist, but they do not necessarily share the same context. Some of them do though. OK, that does paint a different pict

Re: [Interest] rebooted QtWebKit for Qt4??

2020-07-12 Thread Ulf Hermann
It is sad to see people miss the necessity for hardware accelerated UI that QML addresses; Qt widgets backing onto QPainter was extremely problematic to accelerate and the Qt company addressed this with scenegraph/QML. It's actually QtQuick that implements the scene grah and provides accelerate

Re: [Interest] QML/C++ interaction in Qt6

2020-09-11 Thread Ulf Hermann
- Allow QML to access public properties of classes, even if these public properties do not use `Q_PROPERTY` - Allow QML access to classes that are neither `QObject`, nor `QGadget` This is not planned right now. Note that we rely on moc to generate the class descriptions that QML uses. Therefor

Re: [Interest] QML/C++ interaction in Qt6

2020-09-12 Thread Ulf Hermann
Will Qt 6 still use the Meta information to access Qml properties or it rely more on compiled C++ now? I guess it still the same as before. Is the properties declaration of Qt for MCU (Qml lite or soemthign like that) be available (syntax wise, template)? That would leverage soo much redundent cod

Re: [Interest] QML/C++ interaction in Qt6

2020-09-14 Thread Ulf Hermann
On 9/14/20 5:29 PM, Jérôme Godbout wrote: Oh,... now that's a deal breaker... I guess I will have to stick with the old method for a while, having 1 plugins per modules to be expose will need some major refactor over here. I have subrepos who have a single .pri and might expose a few modules and

Re: [Interest] QML/C++ interaction in Qt6

2020-09-15 Thread Ulf Hermann
You can also phrase your modules as C++-only static libraries and link them all together into the application. - That will depends on which C++ library your modules depends on. Not all code can be legally made static, this restriction, seem rather short sighted. Hope they change this. Well, yes,

Re: [Interest] QtPlugins statically linked not loading

2015-06-01 Thread Ulf Hermann
debug server built in and whenever you start it with the right arguments or call QQmlDebuggingEnabler::startTcpServer() it will open a debug port and accept connections from anywhere. With a dynamically linked Qt you have the option to delete the plugin in order to prevent this. regards, -- Ulf

Re: [Interest] QtPlugins statically linked not loading

2015-06-01 Thread Ulf Hermann
he qmldbg_tcp plugin in the .pro file, as that contains the implementation of QTcpServerConnection. Unless, of course, you don't want to do any QML debugging and profiling. In that case you should stick to -DQT_QML_NO_DEBUGGER. -- Ulf Hermann, Software Engineer | The Qt Company The Qt Company GmbH

Re: [Interest] QtPlugins statically linked not loading

2015-06-01 Thread Ulf Hermann
s/Qt/5.4/clang_32_static/qml/QtQuick/Window.2/libwindowplugin.a > LIBS += > /Users/nsantos/Qt/5.4/clang_32_static/qml/QtQuick/Controls/libqtquickcontrolsplugin.a Apparently you've put some important plugins here. You could try adding the qmldbg_tcp one here, too. -- Ulf Hermann,

Re: [Interest] QtPlugins statically linked not loading

2015-06-01 Thread Ulf Hermann
On 06/01/2015 06:10 PM, Thiago Macieira wrote: > On Monday 01 June 2015 15:01:14 Ulf Hermann wrote: >> You probably have to add the following somewhere: >> >> LIBS += /path/to/libqmldbg_tcp.a > > but like I said, he shouldn't have to. That's a bug in QtQml that

Re: [Interest] [QGV] Asynchronous painting of millions QGPathItem

2016-12-06 Thread Ulf Hermann
Hello, I had a somewhat similar, but not quite the same problem when building the timeline view for the QML profiler in Qt Creator. It's currently usable with up to about 1 million events in the timeline and you can zoom and scroll it. There might be potential for further optimization. I used

Re: [Interest] Again trouble with SCXML donedata

2017-01-03 Thread Ulf Hermann
Hello, [...] EventConnection { stateMachine: p.stateMachine events: ["done.state.Leave"] onOccurred: { console.log("done: " + event.name + " [" + event.data + "]") } } [...] done.state.* events are internal. You can expos

Re: [Interest] 2017

2017-01-03 Thread Ulf Hermann
Another alternative of course is to use some other client-server protocol such that only the “model” of MVC is on the server, and UI rendering instructions are sent across the network instead of actual rendered graphics. For example load QML over the network and run it locally. For some rea

Re: [Interest] Crash with Qt application that use OpenGL

2017-04-21 Thread Ulf Hermann
ps: i had a chat with a mozilla developer some time ago: they never use desktop opengl on windows, but only use ANGLE with a fallback to software rendering, if the application crashes on customer's machines. You can force Qt to use Angle by setting the QT_OPENGL environment variable to QT_OPENG

Re: [Interest] QML debugger doesn't work for big cmake-based project

2017-08-11 Thread Ulf Hermann
On 08/11/2017 04:48 PM, Alexander Ivash wrote: > On launching debugger I see 'QML debugging is enabled. Only use this in a > safe environment.' but don't see 'Waiting for connnection...', so it > looks line debugger is not completely initialized. Does your application do anything complicated befo

Re: [Interest] QML debugger doesn't work for big cmake-based project

2017-08-11 Thread Ulf Hermann
On 08/11/2017 05:01 PM, Alexander Ivash wrote: > But then way don't I see 'waiting for connection... ' ? Because it only starts waiting for connections once a QML engine exists. Before that there is nothing to debug anyway. > Also, If what you say is true, then is it possible to increase this t

Re: [Interest] SCXML and datamodel sharing in Qt Quick and C++

2017-12-01 Thread Ulf Hermann
> 1. I use scxml compiler and expose compiled machine to Qt Quick. > 2. I use ecmascript as datamodel type. I create data entries in *.scxml file. > 3. I need to repeat those values on Qt Quick side and assign to > StateMachine.initialValues so that they will be reset everytime machine > starts -

Re: [Interest] ASSERT: "m_engines.contains(engine)" in file qqmlenginedebugservice.cpp, line 802 qqmlenginedebugservice.cpp: 802

2017-12-08 Thread Ulf Hermann
What needs to be done to get rid of this assertion (is it possible at all or QmlDebugger is always expect single QQmlEngine? ) You can have multiple QML engines attached to the debugger, but the current assumption is indeed that they all live in the GUI thread. This can probably be fixed, but

Re: [Interest] QT SCXML: How to access Event parameter from State?

2018-03-16 Thread Ulf Hermann
> In the example above, how would we get access to Event parameter for "state1" > and "state5"? You can access the event currently being processed via the data model. The EcmaScript data model has a readonly property "_event" and the C++ data model has a method scxmlEvent(). The null data model

Re: [Interest] Interest Digest, Vol 79, Issue 19

2018-04-26 Thread Ulf Hermann
> When I said "most machines are little-endian", I was referring to machines Qt > runs on and, therefore, would use QDataStream. The fact that the default is > big endian is short-sighted. It should default to little-endian. We could change the default. All it takes is a new QDataStream::Version

Re: [Interest] qmlscene install problems (was: Interest Digest, Vol 82, Issue 5)

2018-07-16 Thread Ulf Hermann
or doesn't use qmlscene to run it. So, all of this rant is as misplaced as it is unnecessary. The only thing that may be remotely relevant is the comment about Ubuntu's testing practices, but the information we have here is far from being conclusive on this being an actual problem.

Re: [Interest] qmlscene install problems

2018-07-24 Thread Ulf Hermann
On 07/23/2018 07:55 PM, Lisandro Damián Nicanor Pérez Meyer wrote: > El lunes, 16 de julio de 2018 08:12:25 -03 Ulf Hermann escribió: >> This thread has gone so far south, we need to add some corrections ... > [snip] >> So, it turns out I have another qmake (and qmlscene) in

Re: [Interest] qt_add_qml_module and not embedding QML files

2022-10-31 Thread Ulf Hermann via Interest
Is there a way to not embed QML files into the Qt resource system when using qt_add_qml_module() ? We can only pre-compile files embedded into the resource file with qmlcachegen. That's why we strongly recommend using the resource file system. You can, of course still manually write your qmldi

Re: [Interest] qt_add_qml_module and not embedding QML files

2022-10-31 Thread Ulf Hermann via Interest
I cannot use qmlpreview, as I usually need to have the full application running. You can run any application through QML preview. In Qt Creator (in contrast to Qt Design Studio), the option is a bit hidden: There is a "QML Preview" Option in the build menu. Use that to start the application.

Re: [Interest] qt_add_qml_module and not embedding QML files

2022-11-01 Thread Ulf Hermann via Interest
I did not know about that, it looks nice. But... it does not work with my application, it gets stuck at "QML Debugger: Connecting to socket" You probably have to enable QML debugging and profiling in the build and run settings. ___ Interest mailing

Re: [Interest] qt_add_qml_module and not embedding QML files

2022-11-02 Thread Ulf Hermann via Interest
You probably have to enable QML debugging and profiling in the build and run settings. It is already, and it works. I can set breakpoints in QML and it works as expected. Can you try to construct a minimal example that reproduces the problem and create a bug report? One significant d

Re: [Interest] qt_add_qml_module and not embedding QML files

2022-11-02 Thread Ulf Hermann via Interest
2. The app is primarily widgets, but we use QML inside QQuickView, inside container widgets. So when the app starts 3 or 4 QML engines are created. That is a problem. The preview can only handle a single QML engine so far. You should see the following error message: " QML engines available.

Re: [Interest] Scripting within Qt6 and QJSEngine

2022-11-10 Thread Ulf Hermann via Interest
Hi Filippo, the equivalent to Q_OBJECT for value types is Q_GADGET. So, your data structure would look like this: struct DataPoint { Q_GADGET Q_PROPERTY(double x MEMBER x) Q_PROPERTY(double y MEMBER y) public: double x; double y; } Now, depending on what you want to do wi

Re: [Interest] Scripting within Qt6 and QJSEngine

2022-11-14 Thread Ulf Hermann via Interest
That is an intesting question because it somehow pin points something that is not clear to me. Perusing the documentation, I saw that QQmlEngine derives from QJSengine. I cannot figure out which is best to employ in my use case: scripting a QtWidgets C++ application. Can I use QML as a scripting

Re: [Interest] Scripting within Qt6 and QJSEngine

2022-11-14 Thread Ulf Hermann via Interest
I think that QML/JS is not viable for scripting of QtWidgets since public functions are not available when registering Qt classes as types (only slots and Q_INVOKABLE functions next to properties). Without the public class functions only very basic functionality is exposed to the scripting engine.

Re: [Interest] qmake to cmake - error: redefinition of 'unit' const QQmlPrivate::CachedQmlUnit unit

2022-12-15 Thread Ulf Hermann via Interest
list(APPEND QML_FILES resources/qml/Browser.qml resources/qml/BrowserBank.qml resources/qml/BrowserButton.qml … Are there more files called "Browser.qml" in the same module? That doesn't work. Your QML components need unique names. Or is there some qt_target_qml_sources()

Re: [Interest] Qml Linting Error - Warnings occurred while importing module "QtQuick.Controls":

2022-12-19 Thread Ulf Hermann via Interest
Warning: QtQuick.Controls uses optional imports which are not supported. Some types might not be found. This is not an error but a warning. Indeed the compiler will not compile your code to C++ because it doesn't know which of the optional imports (ie styles) will be active at run time. You ca

Re: [Interest] Qml Linting Error - Warnings occurred while importing module "QtQuick.Controls":

2022-12-20 Thread Ulf Hermann via Interest
- Have an option to disable the warning for those who want to support multiple styles in one executable (but still want compilation outside of controls). You said it is possible to "disable the compilation for this specific file", but I'm not sure if that's the same thing as disabling the warni

Re: [Interest] What is the right way of creating a static lib that has qml resources with cmake?

2023-01-11 Thread Ulf Hermann via Interest
With the following approach two libs are created: libshared.a and libsharedplugin.a I just want to have a single target called libshared.a with all the qml resources embedded. You can add NO_PLUGIN to your qt_add_qml_module, but be warned: The linker will be clever and omit your type regi

Re: [Interest] What is the right way of creating a static lib that has qml resources with cmake?

2023-01-12 Thread Ulf Hermann via Interest
If you state STATIC in qt_add_qml_module (without a qt_add_library or similar that makes it dynamic) and then it builds a dynamic library, that's a bug. Please file a report at https://bugreports.qt-project.org with a minimal reproducer and state the version of Qt you are using. If it does bui

Re: [Interest] What is the right way of creating a static lib that has qml resources with cmake?

2023-01-12 Thread Ulf Hermann via Interest
I will try to reproduce the problem basing myself on this. In case I need to submit a bug report what is the category? Add "build system: CMake" and "QML tooling". ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/

  1   2   >