Re: [Interest] How to get a column data from QTableWidget

2020-05-29 Thread Tony Rietwyk
Hi Ghobad, item->tableWidget()->item(item->row(), my_intended_col_index)->data(role) Regards, Tony On 29/05/2020 10:35 pm, Ghobad Zarrinchian wrote: Dear all, I have a QTableWidget with some rows and columns in my application and I want to extract the data from a specific column when its row

Re: [Interest] How to send an arbitrary file over sockets

2020-05-29 Thread Thiago Macieira
On Friday, 29 May 2020 16:29:13 PDT Ghobad Zarrinchian wrote: > Dear all, > I'm writing a client/server application in which the client can send a file > to the server. At the client side, my code is something like below: > > QFile fl(file_name); > > fl.open(QIODevice::ReadOnly); > > QByteArray

Re: [Interest] How to send an arbitrary file over sockets

2020-05-29 Thread Jason H
How do you know how Big the file is? You assume to get it all in a single operation. You should use qdatastream which will properly serialize the byte array including a length. I've recently taken to using the experimental q HTTP server to provide a web interface, or more recently using qwebsock

[Interest] How to send an arbitrary file over sockets

2020-05-29 Thread Ghobad Zarrinchian
Dear all, I'm writing a client/server application in which the client can send a file to the server. At the client side, my code is something like below: QFile fl(file_name); fl.open(QIODevice::ReadOnly); QByteArray fileBytes = fl.readAll(); socket->write(fileBytes); fl.close(); And at the se

Re: [Interest] How to get a column data from QTableWidget

2020-05-29 Thread alexander golks
> void MainWindow::on_tableWidget_itemDoubleClicked(QTableWidgetItem *item) > > { > > QString data = item->col(my_intended_col_index).toString(); // > no such function maybe something like: QString = tableWidget->item(item->row(),my_intended_col_index).toString(); alex< -- /*

[Interest] How to get a column data from QTableWidget

2020-05-29 Thread Ghobad Zarrinchian
Dear all, I have a QTableWidget with some rows and columns in my application and I want to extract the data from a specific column when its row (item) is double clicked. I don't know which function can get me the data when having a pointer to the item. I use the slot function below and need some me