qvector Questions
3
Solved
3
Solved
I am new to c++ and Qt and I am trying to initialize a QVector, which is a class member in a class initialization list like:
MyClass::MyClass(QWidget *parent) : QMainWindow(parent) , myVector(QVec...
8
Solved
2
Solved
I have a class B that creates an object of a class A and calls a method of the object.
a.h
#ifndef A_H
#define A_H
class A
{
public:
A(int);
void function();
};
#endif // A_H
a.cpp
#incl...
1
I can see that that classes are treated as complex objects which are required for calling default constructor:
void QVector<T>::defaultConstruct(T *from, T *to)
{
if (QTypeInfo<T>::is...
Signal asked 27/10, 2015 at 23:38
2
Solved
I'm very confused as to why this isn't working. I must be misunderstanding something key about QVectors...
I've created an MCVE to show the issue:
#include <QCoreApplication>
#include <Q...
Liz asked 1/4, 2018 at 20:48
2
Solved
I have a QVector
QVector(48, 64, 31, -2, 14, 5, 7, -3, -1, 13)
I want to know how to use Qt mechanism to remove all the elements that are smaller than 0.
How do I do this in a simple way? Than...
1
Solved
The Qt container classes QList<T>, QVector<T> etc. require their element types to be copyable. Since C++11, the STL containers require their element type to be copyable or movable only....
Carpal asked 15/9, 2015 at 11:18
1
© 2022 - 2025 — McMap. All rights reserved.