#pyqt | Logs for 2019-04-20
Back
[00:01:46] <grateful> got the grid layout down
[00:01:53] <grateful> https://pastebin.com
[00:02:02] <grateful> only use it in zone1
[00:04:24] <altendky> Good deal
[00:05:37] <grateful> how come my resize doesn't seem to work
[00:10:29] <grateful> oh wow nvm
[00:14:46] <grateful> hmm wait that didn't fix it
[00:27:02] <altendky> grateful: off to bed here, good luck. Feel free to leave questions here
[00:27:10] <grateful> thanks altendky
[00:27:16] <grateful> without you i'd be miles behind :)_
[00:27:22] <grateful> im pretty close to where i want
[00:46:43] -!- mandeep has quit [Remote host closed the connection]
[01:33:51] -!- mandeep has joined #pyqt
[01:36:12] <grateful> how do i update a qlineedit, basically i have a result from a qfiledialog that i want to update the qlineedit
[01:41:55] -!- stochastix has quit [Ping timeout: 264 seconds]
[02:16:02] <mandeep> there's probably a settext or similar method
[02:51:00] -!- saraf has joined #pyqt
[06:25:27] -!- saraf has quit [Read error: Connection reset by peer]
[06:26:52] -!- mintograde has joined #pyqt
[07:16:13] -!- cottoneyejim has joined #pyqt
[10:03:36] -!- JanC has quit [Remote host closed the connection]
[10:09:37] -!- JanC has joined #pyqt
[11:30:30] -!- agile_prg has quit [Disconnected by services]
[12:13:48] -!- mandeep has quit [Ping timeout: 245 seconds]
[12:17:03] -!- mandeep has joined #pyqt
[12:24:43] <grateful> thanks
[12:32:49] -!- cottoneyejim has quit [Quit: cottoneyejim]
[12:51:23] <grateful> https://pastebin.com
[12:51:27] <grateful> what i have thus far :)
[13:23:55] <Avaris> :[ global?
[13:24:18] -!- BPL has joined #pyqt
[13:48:17] <grateful> is it not needed?
[13:49:42] <Avaris> have instance attributes instead. self.reportname1 etc
[13:53:11] <Avaris> in fact, you can use line edit contents instead. not much need for those variables
[13:54:15] <Avaris> 3 almost identical functions can be reduced to 1 that accepts a line edit and functools partial for signal connecting
[13:58:09] <Avaris> time.sleep loop is probably simulating a process? currently it should block ui (becomes non-responsive). inside `QApplication.instance().processEvents()` would help
[14:04:23] <grateful> thanks for the help, yeah just to simulate
[14:32:55] <BPL> Hey guys, I'm aware not many people here familiar with QScintilla but I'm lucky and someone knows what's wrong with this little snippet https://stackoverflow.com :D
[14:33:06] <BPL> *maybe I'm lucky
[14:34:23] <grateful> self.findFile1.clicked.connect(self.openFileNameDialog('1'))
[14:34:24] <grateful> TypeError: argument 1 has unexpected type 'NoneType'
[14:34:55] <BPL> yeah, self.openFileNameDialog('1') is returning None
[14:35:14] <Avaris> grateful: you need to give it a function, you're running the function
[14:35:28] <BPL> maybe you want `self.findFile1.clicked.connect(lambda whatever='1': self.openFileNameDialog(whatever))`
[14:36:01] <BPL> Avaris: by any chance, you were familiar with QScintilla or...?
[14:36:05] <Avaris> (button clicked signal sends parameters)
[14:36:13] <grateful> ah
[14:36:14] <Avaris> BPL: not really
[14:36:22] <BPL> Avaris: ah, ok ;)
[14:37:34] <grateful> thanks guys
[14:38:20] <BPL> \:O
[14:52:34] <Avaris> BPL: shouldn't you use `start` and `end` parameters?
[14:55:10] <BPL> Avaris: Well, start & end parameters are qsinctilla suggestions about which chunk of text changed, for more info you can read here a nice example https://qscintilla.com ... but now you mention it, i'm gonna ignore completely start and just try to highlight the whole text :/
[14:56:00] <Avaris> you mention performance....
[14:56:26] -!- kallesbar has quit [Quit: Konversation terminated!]
[14:57:27] <Avaris> but, since you style whole thing, right now it should be self.startStyling(0) i think
[14:59:01] <BPL> yeah, that's what i'm gonna test right now... so that way it'll be easier to check what i'm doing wrong :)
[15:01:36] <Avaris> heh that site suggests cython for fast highlighting
[15:02:00] <BPL> Avaris: yeah, still wrong when using the whole chunk of text https://bpaste.net . Look https://dl.dropboxusercontent.com
[15:02:48] <BPL> Avaris: well, before considering pygment i'd created python bindings of this https://github.com ... but i'd got stuck trying to make it fast (caching and so on)... so today i've decided to give it a shot to the good old pygments :D
[15:03:06] <Avaris> can you paste the `print` stuff too?
[15:03:59] <BPL> here's the dump https://bpaste.net of pressing "Return" few times
[15:06:06] <Avaris> where are the `\n`s at the start?
[15:06:13] <Avaris> does it strip?
[15:06:24] <Avaris> i think that's messing it up
[15:06:48] <grateful> can you place the icon after the text on a qpushbutton
[15:08:21] <Avaris> grateful: not easily
[15:08:52] <grateful> k
[15:10:15] <BPL> Avaris: Mmmm, good question :O
[15:11:21] <BPL> Avaris: Indeed, look https://bpaste.net :/
[15:11:47] <BPL> it seems the pygments tokenizer is ignoring them
[15:12:12] <BPL> weird... but now it makes sense why the eric lexer was doing some stuff to skip them
[15:12:41] <BPL> Avaris: look https://github.com
[15:13:11] <BPL> not sure what's the meaning of this line `self.editor.startStyling(cpos, 0x3f)` though :O , 0x3f?
[15:14:30] -!- mandeep has quit [Remote host closed the connection]
[15:14:34] <grateful> self.setWindowIcon(QIcon(QPixmap("bar.png")))
[15:14:37] <grateful> anyting wrong with that?
[15:19:03] <BPL> Avaris: Ok, works, editing my question... now it only remains to make it faster :)
[15:23:42] <BPL> Avaris: edited on SO, ty for the suggestion of initial eol chars... it seems pygments tokenizer will ignore those
[16:01:07] <Avaris> grateful: looks fine. make sure path is correct
[16:04:46] <BPL> Avaris: Ok, edited again my question&code https://stackoverflow.com , i think i won't modify it any longer as the question has become quite clear :) ... One thing i've never understood is why you need to wait a lot of time to give bounties... as I'll probably be giving 500 bounties as soon as i can lol xD
[16:05:34] <BPL> Avaris: I've got a new challenge, which is getting top 100 here https://data.stackexchange.com :)
[16:07:00] <Avaris> well documentation says to implement lexer in cython for speed
[16:11:01] <Avaris> this looks neat: https://github.com
[16:44:55] <BPL> not really, using solutions such as pygments and syntect you'll get hundreds of language support as well as dozen of themes, coding your own cython/c/whatever lexers is definitely far away of what i'd call neat :)
[16:45:39] <BPL> for instance, look at this https://github.com i thought creating python binding out of that, cos that library is blazingly fast but i didn't do... you know why?
[16:45:51] <BPL> cos it's only supporting few lexers and it's hard to create your custom ones
[17:04:58] -!- Thaodan has quit [Quit: ZNC - https://znc.in]
[17:06:20] <Avaris> i meant the app. interesting menu/overlay design
[17:07:35] -!- Thaodan has joined #pyqt
[17:15:37] <BPL> ah, sure... i'd tried exco few months ago, quite cool stuff, btw, his author knows quite a lot about qscintilla
[18:20:26] -!- n1` has quit [Ping timeout: 250 seconds]
[19:02:43] -!- Thaodan has quit [Quit: ZNC - https://znc.in]
[19:06:21] -!- Thaodan has joined #pyqt
[20:36:51] -!- BPL has quit [Quit: Leaving]
[21:01:43] -!- Thaodan has quit [Quit: ZNC - https://znc.in]
[21:06:03] -!- Thaodan has joined #pyqt
[22:24:05] -!- mintograde has quit [Ping timeout: 246 seconds]
[23:13:36] -!- kallesbar has joined #pyqt
[23:34:39] -!- Belxjander has quit [Ping timeout: 250 seconds]
[23:38:09] -!- Belxjander has joined #pyqt
[23:54:08] -!- Belxjander has quit [Ping timeout: 244 seconds]