Questions tagged [objectname]
49 questions
0
votes
4 answers
Iterating object names in C++
How can one iterate through an array to manipulate or access different objects and their member functions? I have 10 objects. Right now I have the same code accessing each object member function and manipulating object data basically copied and…

reformed
- 4,505
- 11
- 62
- 88
-1
votes
2 answers
How do I get the objectName of QML elements I click on?
I'm new in a rather large QML codebase and I want to know the properties of the QML element I click on when running the application, e.g. objectName.
E.g. the name "button" in this main.qml.
The equivalent in Qt is QApplication::widgetAt() or…

elsamuko
- 668
- 6
- 16
-1
votes
1 answer
object name identical to namespace name: redeclaration
Why is it an issue when an object defined in the file scope has the same name as an existing namespace? Why is this ok in the function scope (e.g. inside main)?
Example:
#include
namespace foo {
class Foo {};
}
namespace bar {
…

Ced
- 37
- 2
-4
votes
1 answer
I want to write a function in Java that takes a String as argument and creates an object with the same name
Say I am getting names of people and want to create person objects of the same name, something like this :
void foo(String str){
Person str = new Person();
}
So that later I can refer to the person by name, something like :
int…

whatzdamatter
- 1
- 1