Questions tagged [metaobject]
26 questions
2
votes
1 answer
Generated moc names are not correct
I am working on a Qt based project that uses cmake. All of my generated moc files are named *.moc, but I have some files that their generated moc files have names moc_*.cpp, not *.moc. Why this happens and how I can fix these files.
EDIT:
I want to…

Wazery
- 15,394
- 19
- 63
- 95
1
vote
1 answer
Why does staticMetaObject.className() return the class name of the parent class?
I have a class 'Default' derived from a class 'Units' and when I do:
Default::staticMetaObject.className())
it returns Units instead of Default. Why is that? How can I fix this?

Marc
- 767
- 1
- 10
- 23
1
vote
2 answers
Qt trigger signal on all instances of a given class
Typically Qt signals are triggered on a specific instance of a QObject.
Is there a way to trigger it on all instances of a specific class via, perhaps, MetaObjects?
Or the only way is to maintain your own static list of all instances, perhaps by…

qdot
- 6,195
- 5
- 44
- 95
0
votes
0 answers
In Shopify using GraphQL how should I query a metaobject and a sub-query metaobject in a single query?
I am building a website with Shopify Hydrogen.
Using GraphQL I am accessing MetaObjects.
The structure of the MetaObject is one field and one sub-MetaObject (a generic, reusable meta object).
I wish to have a query that gives me the fields from the…

DanAbdn
- 7,151
- 7
- 27
- 38
0
votes
1 answer
Loop through a metaobject's metafields in Shopify/Liquid
I am trying to loop through a metaobject's metafields in Shopify/Liquid without knowing the specific metafield keys, but can't seem to figure it out. I've successfully grabbed the metaobject, in this case it's referenced on a product via a…

gcoulson
- 21
- 3
0
votes
2 answers
Shopify: how to access a Shopify metafield using JavaScript in a .liquid file?
I am trying to access a Shopify metafield using JavaScript in a .liquid file. The metafield is a single line text field.
{% javascript %}
console.log({{product.metafields.custom.sample_name.value}});
{% endjavascript %}
Some things I've tried…

mikezn
- 13
- 3
0
votes
2 answers
Calling method with array or arguments using QueuedConnection
I want to call arbitrary slot of QObject in other thread.
I have:
| Arguments: | Can use QueuedConnection?
QMetaObject::invokeMethod | fixed number | YES
qt_metacall | array | NO
I…

Vi.
- 37,014
- 18
- 93
- 148
0
votes
1 answer
Find a referenced metaobject for each item in cart
I am using metaobjects and refernce them in certain products.
In my cart liquid, I want to loop over the products and find all references to the metaobject. If one is linked to a product in the cart, I need to access additional data in the…

anna
- 1
- 2
0
votes
0 answers
Metaobject compiler for C
I need write a metaobject compiler for C (like a MOC in Qt). I will add to *.c source own keywords and mechanisms (like slots/signals in Qt).
I'll represent this work in three stages:
Writing C-code with own constructions
Parsing and generation of…

dark
- 167
- 1
- 6
- 17
0
votes
0 answers
How can I determine the number and type of metaobjects created?
As far as I've seen, metaobjects are of type: Type-Info Data-Info and ObjectCreator.
In a Java application, how does one determine the number and type of metaobjects created?
Take for instance the following sample code:
public class Dtest extends…

Bogdan Molinger
- 251
- 1
- 6
- 19
0
votes
2 answers
QMetaObject Compiler explain?
I am trying to know how Qt implements meta object compiling which enables them to provide signal slot mechanism in Qt. I am not able to finding much details in the documentation.
EDIT::I am not able to get the source code of _id =…

Passionate programmer
- 5,748
- 10
- 39
- 43