QStandardItemModel *model = new QStandardItemModel();
for (auto& x : tx->AddrsTo)
{
Qstring s(x.c_str());
QStringList items = s.split(';');
int sz = items.size();
for(int i = 0; i < sz; ++i)
{
model->setItem(0, i, new QStandardItem(items[i]));
}
}
this->findChild<QTableView*>("Adresses_tableView")->setModel(model);
QBuffer::QBuffer(QByteArray *byteArray, QObject *parent = nullptr)
QByteArray ba;
int n = 63;
ba.setNum(n); // ba == "63"
QBuffer buffer(&ba);
#include <iostream>
#include <list>
#include <algorithm>
using namespace std;
template<typename Container, typename value>
bool remove_value(Container& c, value v)
{
if(auto it{find(begin(c), end(c), v)}; it != end(c))
{
c.erase(it);
return true;
}
return false;
}
int main()
{
list<int> myList {1,2,3,4,5,6,7,8,9,10};
//myList.erase(std::remove(myList.begin(), myList.end(), 7));
/*if(auto it{find(myList.begin(), myList.end(), 7)}; it != myList.end())
{
myList.erase(it);
}*/
if(int value = 7; remove_value(myList, value))
{
cout << "removed value: " << value << endl;
}
else
{
cout << "value: " << value << " not found" << endl;
}
for(int v:myList)
{
std::cout << v << ' ';
}
}
Имеется некий Pawn, где в:
.h file:
#include “MyController.h”
...
AMyController * GameController; - никуда не указывает.
...
public:
void CursorManagment();