#pyqt | Logs for 2019-01-29
Back
[00:17:28] -!- Grange has quit [Read error: Connection reset by peer]
[03:08:23] -!- Mrokii has joined #pyqt
[03:11:05] <Mrokii> What would I need to do with a qtableview (or its model) to be able to save the content of specific cells (so that wen the user changes the cell I know what the old value was).
[05:10:57] -!- BPL has joined #pyqt
[05:54:46] <Avaris> Mrokii: well... save them? if you're asking how to do it, model.setValue is called when a user changes cells. you'd store the value in there before updating
[05:56:03] <Avaris> *setData rather
[06:05:56] <BPL> I've got a QDockWidget with a QLineEdit and I was wondering how to use https://docs.python.org on it, trying to find any example about it... anyone?
[06:29:38] <BPL> n.mind, done :P
[09:00:57] -!- Siecje has joined #pyqt
[10:11:29] -!- Lauxley has joined #pyqt
[10:18:26] -!- BPL has quit [Ping timeout: 240 seconds]
[10:21:27] -!- BPL has joined #pyqt
[11:17:03] -!- AbleBacon has joined #pyqt
[11:43:49] -!- david_boddie has joined #pyqt
[11:46:27] <agile_prg> altendky did you try my game?
[12:14:42] <altendky> agile_prg: a bit chunky in my vm, but it runs
[12:15:08] -!- saraf has joined #pyqt
[12:20:45] <agile_prg> heh nice
[12:20:55] <agile_prg> did you press the right arrow to get the boat to move?
[12:21:02] <altendky> i did
[12:21:17] <agile_prg> and did you see the waves disappear?
[12:21:45] <altendky> i did
[12:21:51] <agile_prg> ok you won the game
[12:22:02] <agile_prg> unity is free, crazy fun to play with
[12:22:14] <agile_prg> know this
[12:22:49] <altendky> too booked with reviews and prs and tools to build...
[12:23:34] <agile_prg> prs?
[12:23:41] <altendky> PRs
[12:23:43] <altendky> pull requests
[12:23:48] <agile_prg> oh ok
[12:34:03] <BPL> mmm, never used unity but I've got curious from this conversation, did you use some unity bindings inside a pyqt app?
[12:58:52] -!- frispete has quit [Ping timeout: 246 seconds]
[13:07:31] -!- frispete has joined #pyqt
[13:23:16] -!- frispete has quit [Ping timeout: 268 seconds]
[13:43:06] -!- saraf has quit [Read error: Connection reset by peer]
[13:58:19] -!- xiterrex has joined #pyqt
[14:04:51] -!- Lauxley has quit [Remote host closed the connection]
[14:44:23] <agile_prg> no, strictly a unity c# app I made during a hakathon
[15:16:19] <BPL> ah, hehe, cool, i saw some fragments of your last conversation in this channel so i just thought... :D
[15:41:12] -!- mintograde has joined #pyqt
[15:43:37] -!- xiterrex has quit [Quit: xiterrex]
[16:02:12] -!- david_boddie has parted #pyqt
[16:04:24] -!- kdas_ has joined #pyqt
[16:05:41] -!- kushal has quit [Ping timeout: 256 seconds]
[16:14:23] -!- frispete has joined #pyqt
[16:18:24] -!- necrose99 has joined #pyqt
[16:23:10] -!- Siecje has parted #pyqt
[16:23:23] -!- Siecje has joined #pyqt
[16:23:46] -!- Siecje has parted #pyqt
[17:53:01] <BPL> hi, anyone familiar with QTcpServer behaviour?
[18:04:18] <altendky> BPL: nope. You don't want to use a nice python async networking framework where you can actually async/await?
[18:05:54] <BPL> altendky: If possible, I'd like to use the beauties provided by pyqt... my code was working til few minutes ago I've discovered I'm not using correctly QTcpserver. Ie: When sending huge blobs of data I'm not reading the whole content :/
[18:06:17] <BPL> altendky: in any case, of course, I'll hear all sort of suggestions as I'm a newbie with all related to network communication
[18:09:20] <altendky> BPL: I go the other way and use not qt options for anything reasonable. You can run twisted on the qt event loop via qt5reactor.
[18:14:15] <BPL> altendky: Yeah, sure, heard very good things about twisted but if possible i'd like to learn what's wrong with this piece of code, server: https://bpaste.net client: https://bpaste.net
[18:21:39] <The-Compiler> BPL: socket.waitForReadyRead() only waits for one readyRead signal, but there might be multiple if the data is chunked
[18:22:04] <Avaris> BPL: doesn't tcp chunk data?
[18:23:37] <Avaris> unless i'm misunderstanding nextPendingConnection and it returns same socket over and over, that should only read the first chunk of each connection
[18:24:07] <The-Compiler> yup
[18:27:41] <BPL> hey guys, read now your comments, also asked in #qt
[18:27:47] <BPL> and they told me "<peppe> BPL: you need to fix your code. nextPendingConnection returns a QTcpSocket. connect to its readyRead() signal and read data every time the signal is emitted
[18:27:47] <BPL> <peppe> then, the sender has somehow to tell you that it has finished sending the data"
[18:33:54] <altendky> also, don't invent your own protocol, probably
[18:42:34] <BPL> ok, disconnect did the job, readyRead+disconnected was all I needed, ty!
[18:43:36] <altendky> pretty sure disconnect won't make sure you read the rest of the data
[18:44:35] <BPL> altendky: not disconnect sorry, I meant `[signal] void QAbstractSocket::disconnected()`
[18:45:46] <altendky> BPL: you don't read the entirety of a tcp connection in one read generally.
[18:46:08] <altendky> rather, you can't plan on it
[18:46:24] <BPL> altendky: yeah, sure, so?
[18:46:25] <altendky> BPL: when data is ready to be read, it might be one byte. you don't control that.
[18:46:46] <altendky> BPL: so the comments above said you were only reading once from each connection.
[18:51:18] -!- necrose99 has quit [Ping timeout: 245 seconds]
[19:09:21] <altendky> It's sort of like dealing with Unicode in py2. You think it's working fine... But it's all wrong and eventually shows up
[19:22:39] -!- BPL has quit [Quit: Leaving]
[20:03:14] kdas_ is now known as kushal
[21:38:22] -!- mintograde has quit [Ping timeout: 250 seconds]
[22:15:45] -!- AbleBacon has quit [Quit: Leaving]
[22:58:37] -!- Mrokii has quit [Ping timeout: 268 seconds]
[23:13:08] -!- Mrokii has joined #pyqt