Questions tagged [slots]
`__slots__` is a python language feature to reduce size of object instances by dropping the builtin dictionary every python instance normally features in order to support dynamic assignment of attributes and replacing it with a fixed set of attributes (the 'slots').
slots
315
questions
0
votes
0
answers
23
views
How to use pyqtSlot() without @
I need to create a method in a foreign PyQt5 window class at runtime (that will be called later from a different thread with QMetaObject.invokeMethod()). Therefore I cannot use the decorator style. Is ...
0
votes
1
answer
40
views
Qt: virtual slots disconnect
I have such code example
#include <QAbstractItemModel>
QAbstractItemModel* pSomeModel;
class A : public QObject
{
public:
A(){
connect(pSomeModel, &QAbstractItemModel::...
2
votes
1
answer
48
views
How does __slots__ inheritance work? (My code works and I don't know why)
Here is the example of my implementation:
class FileHandler:
__slots__ = ("_target_path",)
def __init__(self, target_path: Path) -> None:
self._target_path = target_path
...
-1
votes
1
answer
49
views
Vue slots within a loop for a slider component
I'm having a bit of trouble working out how to use slots for a SliderA component.
SliderA component looks like the following with slides being an array prop.
<template>
<div class="...
0
votes
1
answer
46
views
How to use scoped slot prop in parent computed
I have a thightly coupled duo of parent-child components using a scoped slot. In the parent, some data is received from the child via the scoped slot prop (let's call it myScopedProp). All is well ...
0
votes
0
answers
91
views
Coding logic for 4x3 slot machine Kotlin -> Android Studio
I just want to start off with, be gentle with me please. This is all new to me and I'm still learning.
I'm creating a slot game app, but I'm struggling with the coding on it recognizing patterns for ...
0
votes
1
answer
135
views
Vue3 - slot with v-model html rendered with render function
In vue3 I have this:
<template>
<ChildComponent>
<div>
<input type="text" v-model="myValue"/>
</div>
</ChildComponent>
</...
0
votes
0
answers
26
views
sleep() doesn't work in synch with button slots [duplicate]
I am trying to create a function that would display a message for only a few seconds after a button press, before displaying nothing once more.
Changing another label text works just fine, but the ...
0
votes
0
answers
17
views
PyQt5 how to notify a (running in a loop) threadpool created using QThreadPool() that a checkbox has change state
This is working for me with the checkbox example but in the future I'd like to use other user inputs as well. And searching the topic did not show any solution but one thing is that GUI operations ...
0
votes
0
answers
98
views
Vuetify 3 wrap component
I'd like to wrap a simple v-img setting the placeholder slot but I want to keep the functionality to pass other defined slots in the v-img.
Plus, I'd like to keep the typescript hinting from outside ...
0
votes
1
answer
263
views
Bigquery estimated cost calculated using total_slots_ms is very different than bigquery reservation API billing cost
I'm using this query to find total cost of using slots.total_cost calculated here is drastically different than what I see in BigQuery reservation API. I have standard edition. Am I missing something?
...
0
votes
0
answers
43
views
Is 2D configurator doable with python or JavaScript?
So, I need help with developing a 2D configurator that would have a drag and drop feature and would also be able to allow slots customizations for items on sale on a shopify shop. The items are ...
0
votes
0
answers
55
views
Flyway for Bigquery can query project be different than job run project?
We are using Flyway for Google bigquery to run SQL migrations. Bigquery slots are not allocated to the project where the data resides. We want to run the flyway job from a different project and run ...
1
vote
2
answers
522
views
How to render a dynamic slot component in Storybook (Nuxt3)
I have a dynamic named slot that looks as below.
<div>
<template #middle>
<slot :name="`middle-${index}`" />
</template>
</div>
I want to render this ...
0
votes
0
answers
48
views
Can't use connect on a class that inherits from QObject [duplicate]
I've been trying to create a timer that every time it runs out it will add something to a list. To do this i need to add a slot to the signal of the timer running out.
#ifndef GAMEMODEL_H
#define ...