Print to screen from qDebug
-
QProcess process;
process.start("sudo devmem2 0x80000000");
process.waitForFinished(-1); // will wait forever until finishedQString stdout = process.readAllStandardOutput();
QString stderr = process.readAllStandardError();qDebug() << stdout; ui->lineEdit->setText(qDebug());
I want to display my qDebug to lineEdit in Qt.
-
@JonB well, that's one way of looking at it, I think its nice, that after 35 Years, the user base still grows and the language still adapts new features :)
look at this beauty and tell me its hideous :P
int main() { std::vector<int> ints{0,1,2,3,4,5}; auto even = [](int i){ return 0 == i % 2; }; auto square = [](int i) { return i * i; }; for (int i : ints | std::views::filter(even) | std::views::transform(square)) { std::cout << i << ' '; } } //Output: 0 4 16
-
@J-Hilk
This is probably not the place for a discussion, but yes I think it's hard to read/understand. WTF is that|
logical-or operator doing in thefor
against arrays? (Yes, I can guess...) Is it really easier to read or more efficient than anif
inside the loop? Depending on how thatfor ( ... | ...)
is implemented, it could be hideously inefficient!