#pyqt | Logs for 2019-04-05

Back
[01:44:48] -!- n1` has joined #pyqt
[02:34:11] -!- n1` has quit [Ping timeout: 250 seconds]
[02:34:11] -!- logs has quit [Ping timeout: 246 seconds]
[02:35:23] -!- logs has joined #pyqt
[02:51:10] -!- n1` has joined #pyqt
[03:13:06] -!- deadmarshal has joined #pyqt
[03:14:29] <deadmarshal> hey guys. I have html tags in my db, and when inserted to the textwidget, i want textwidget to understand those html tags and convert them, what should i do?
[03:14:56] <The-Compiler> deadmarshal: a textwidget only does a very small subset of HTML
[03:15:17] <The-Compiler> if you mean a QTextEdit that is
[03:15:38] <deadmarshal> yes QTextEdit.
[03:15:43] <The-Compiler> setHtml then
[03:15:54] <The-Compiler> (or setText if the autodetection works)
[03:17:30] <deadmarshal> now i used textEdit.insertHtml() and textEdit.setText(), but won't show html.
[03:18:16] <The-Compiler> do you have an example?
[03:19:51] <deadmarshal> in linkClicked method: https://bpaste.net
[03:21:36] <The-Compiler> http://www.sscce.org ;)
[03:23:18] <deadmarshal> ah sorry :). just linkclicked method is important here look at that.
[03:24:03] <The-Compiler> I still can't run that example or see what data you're actually passing in
[03:24:58] <deadmarshal> the data i'm inserting is strings of text in db.
[03:30:21] <The-Compiler> try creating a minimal example with some actual data from your db which doesn't work - either you'll find some bug in your code (I don't see anything off-hand), or you'll end up with some example (including data) someone can actually run and find out what's going on
[03:31:45] <The-Compiler> without actually seeing what you're passing, I'm guessing your HTML is more sophisticated than what QTextEdit handles
[03:32:23] <The-Compiler> also see https://doc.qt.io
[03:33:54] <deadmarshal> nah my html is simple it only has <b></b> tags :D
[04:29:39] -!- deadmarshal has quit [Quit: Leaving.]
[06:44:32] -!- jessequinn has joined #pyqt
[07:42:27] -!- Bjander has joined #pyqt
[07:42:33] -!- Belxjander has quit [Ping timeout: 245 seconds]
[07:44:01] Bjander is now known as Belxjander
[08:05:45] -!- nsizemor has joined #pyqt
[09:18:17] -!- altendky has joined #pyqt
[10:08:41] -!- BPL has joined #pyqt
[11:07:28] -!- deadmarshal has joined #pyqt
[11:22:29] -!- AbleBacon has joined #pyqt
[11:43:28] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[11:45:45] -!- Belxjander has joined #pyqt
[11:45:45] -!- Belxjander has quit [Excess Flood]
[11:46:27] -!- Belxjander has joined #pyqt
[11:54:30] -!- cottoneyejim has quit [Quit: cottoneyejim]
[12:53:40] -!- agile_prg has quit [Remote host closed the connection]
[13:23:06] -!- kallesbar has joined #pyqt
[13:44:02] -!- AbleBacon has quit [Quit: Leaving]
[14:09:15] -!- deadmarshal has quit [Quit: Leaving.]
[14:11:34] -!- jessequinn has quit [Remote host closed the connection]
[14:21:52] <BPL> The-Compiler: Hi, sorry to ping you, gotta minute? question related with QWebEngineView ... asking to you directly cos from #qt-pyside & #pyqt I consider you an authority on this subject :'D
[14:28:10] <The-Compiler> BPL: your question is missing the actual question ;)
[14:28:22] <The-Compiler> but yeah, I'll try :)
[14:29:34] <BPL> The-Compiler: Hehe, ok, I'm experimenting a little bit trying to embed some demos from Codemirror, yet another standalone text editor for the web... so after cloning the codemirror repo, i've created a qrc with all html files, js files, png files, css files and then just load one of the demos. This is what I've got https://dl.dropboxusercontent.com , so...
[14:30:08] <BPL> my question is, what could be the reason of some missing elements like that png? Cos if i copy the link address of that image I've got "qrc:/codemirror-5.45.0/doc/logo.png"
[14:30:29] <BPL> and my qrc files looks like this https://bpaste.net
[14:30:52] <BPL> as you can see there is an entry `<file>codemirror-5.45.0/doc/logo.png</file>` , so I'm not sure what's going on here :O
[14:30:54] <The-Compiler> BPL: might want to look at the inspector for starters - I think you can set QTWEBENGINE_REMOTE_DEBUGGING=9999 in the environment you're starting your app and then go to localhost:9999 in a Chromium-like browser
[14:31:22] <BPL> Interesting, that was another question i was going to ask actually... how to retrieve all the missing files :'D
[14:31:24] <BPL> let me check
[14:37:07] -!- kallesbar has quit [Quit: Konversation terminated!]
[14:38:46] <The-Compiler> AFAIK qrc:/ also has some security restrictions - you might need to define your own QWebEngineUrlSchemeHandler which reads the files in Python, dunno
[14:38:53] <The-Compiler> I've never used qrc:
[14:39:32] <BPL> The-Compiler: Ok, let's focus on this debugger thing, as that sounds really handy, I've done this https://dl.dropboxusercontent.com , what should i expect when i type localhost:9999 ?
[14:43:43] <BPL> let me try this one https://stackoverflow.com
[14:44:08] <altendky> BPL: you need to set the variable and then launch your program so it gets that env var
[14:45:18] <BPL> altendky: yeah, that's what i did, look at my screenshot, set the env var and the spawned google chrome... theorically localhost:9999 should show me something if doing so, isn't? Or...?
[14:45:44] <altendky> BPL: you need to set the variable and then launch _your_program_ so it gets that env var
[14:46:20] <altendky> i wouldn't expect chrome to care about a QT* env var and i certainly wouldn't expect chrome to be able to enable debugging in your application
[14:46:44] <BPL> oh, ok, yeah... i can debug stuff now, ty :) , let's see
[14:47:59] <BPL> The-Compiler: altendky: Look https://dl.dropboxusercontent.com , what could this mean? I've launched QApplication like this -> app = QApplication(sys.argv+["--disable-web-security"]) :/
[14:49:01] <BPL> mmm, all textual resources have been loaded ok in chromium, mmm :/
[14:49:10] <altendky> BPL: have you double checked the png?
[14:49:17] <BPL> you mean the path?
[14:49:28] <altendky> BPL: no, actually looked at it
[14:49:33] <BPL> ah, no, let me see
[14:49:36] <altendky> to see the image data it contains
[14:49:50] <BPL> altendky: https://dl.dropboxusercontent.com
[14:49:54] <BPL> yeah, the image looks fine
[14:51:09] <The-Compiler> BPL: what about the console tab?
[14:51:15] <BPL> The-Compiler: https://dl.dropboxusercontent.com
[14:51:37] <BPL> The-Compiler: not sure what does mean though :/
[14:52:26] <The-Compiler> Me neither, might be the qrc security restrictions I mentioned
[14:53:13] <BPL> probably... you see any suspicious thing in this line `app = QApplication(sys.argv+["--disable-web-security"])` ?
[14:54:13] <BPL> it also fails loading qrc:/codemirror-5.45.0/doc/docs.css so my theory about issues with binary content is discarded, mmm
[15:16:22] <BPL> altendky: The-Compiler: https://dl.dropboxusercontent.com , grrr... solved :P
[15:23:04] <The-Compiler> BPL: how?
[15:24:07] <BPL> The-Compiler: Well, i'd created a bunch of python resources files and i was using an old one with missing content but I thought I was just using the new one :/ , nothing fancy like security issues or whatever... just me being clumsy :D
[15:24:31] <BPL> The-Compiler: Btw... this component is great BUT i'm experiencing some subtle glitches I don't see at all with chrome :/
[15:24:50] <BPL> Let me try to create a video, maybe you know something about it
[15:27:36] <BPL> The-Compiler: Please take a look to this side-by-side comparison between QtWebEngineView vs Chrome https://dl.dropboxusercontent.com , not gonna explain what's the bug but I'm sure you'll notice it straightaway, which is pretty annoying when you're editing text :/
[15:28:56] <altendky> BPL: the little yellow glitch bouncing here and there?
[15:29:33] <BPL> altendky: yeah... that one, really disturbing :( , and with chrome is totally smooth and pleasant to edit text though
[15:30:05] <BPL> altendky: And I'm pretty sure it's not because the widget is bad because I'd also experienced that glitch when I'd tried embedding Ace (another standalone text editor widget)
[15:32:39] <Avaris> looks like a cursor paint issue
[15:33:03] <BPL> Avaris: Yeah, indeed, some sort of issue with refreshing rate...
[15:34:21] <BPL> would anyone want to give it a shot on his box so we'll know it's easy to reproduce? If it's so I can upload it to github
[15:34:54] <BPL> although I'm using pyside2 over here :/
[15:39:05] <BPL> any idea how to check whether `--disable-gpu` flag has been implicitely set on the widget?
[15:39:51] -!- kallesbar has joined #pyqt
[15:49:14] <BPL> meh, never mind, i give up, this was another little experiment to check if I could have a ready to use nice text editor in my qt python apps but let's be serious, embedding web content with chromium, electron or similar on desktop apps is a really bad idea :(
[15:52:23] <BPL> which is sad... as this codemirror widget is really nice with all the features i needed. There are 71 js source files . If I've just got an army of 10 coders, 7 files per coder, 1 file transpilation & test per day... we'd got the thing ported to python in 1 week :'D
[15:56:43] <altendky> we could all get so much more done if we could summon a dozen people for a week each time we needed something...
[15:57:16] <BPL> exactly, money rules the world ;)
[15:59:14] -!- Belxjander has quit [Ping timeout: 250 seconds]
[16:01:51] -!- Belxjander has joined #pyqt
[16:01:58] <BPL> altendky: In any case, I feel I've wasted a lot of time these last weeks messing around and researching about all my options of having a nice text editor ready to go with pyqt/pyside2. I must to say a lot of my experiments lead me nowhere, which is actually frustrating as usually on my 2nd and 3rd attempt I use to find the right choice, but in here... I must have tried like 8 or 9, lost already the count :P
[16:09:35] -!- nsizemor has quit [Quit: nsizemor]
[16:09:49] -!- Belxjander has quit [Ping timeout: 246 seconds]
[16:58:41] -!- mintograde has joined #pyqt
[17:25:51] -!- Dave_Elec has joined #pyqt