#pyqt | Logs for 2018-09-13

Back
[01:03:44] -!- sssstavr has quit [Remote host closed the connection]
[01:31:30] -!- nik90 has joined #pyqt
[02:04:01] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[02:06:30] -!- Belxjander has joined #pyqt
[02:09:19] -!- anqxyr has joined #pyqt
[02:17:55] -!- anqxyr has quit [Ping timeout: 244 seconds]
[03:01:46] -!- Flaghacker has joined #pyqt
[03:01:57] -!- Flaghacker has quit [Client Quit]
[03:02:27] -!- Flaghacker has joined #pyqt
[04:37:59] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[04:39:54] -!- Belxjander has joined #pyqt
[04:51:18] -!- anqxyr has joined #pyqt
[05:40:10] -!- anqxyr has quit [Ping timeout: 272 seconds]
[05:46:50] -!- Grange has joined #pyqt
[05:49:21] <Grange> Hi all. I got a question regarding table view. I found that if I set `tv.horizontalHeader().setSectionResizeMode(Stretch)`, I can't drag to adjust column widths. If set to `Interactive` my table won't expand to fill the widget space. Any idea how to achieve both?
[05:51:16] <Grange> btw adding both lines the later one seems to overwrite the previous
[06:02:37] <Flaghacker> Grange, Looking at http://doc.qt.io it's indeed impossible to combine Iteractive with anything else.
[06:04:05] -!- mintograde has joined #pyqt
[06:13:01] <Grange> sad
[06:25:35] -!- jthornton has quit [Quit: Leaving]
[06:27:48] -!- jthornton has joined #pyqt
[06:37:06] <nik90> Hi all, I am hitting a strange bug in my app which has a QWebEngineView widget. On quiting the app, the Qt QWebEngineViewProcess lingers as an orphan process eating up 30% CPU. Although this only affects the Windows platform.
[06:37:39] <nik90> Has anyone in this channel faced this issue? If yes, how did you fix it?
[06:37:55] <nik90> I tried the workaround in https://stackoverflow.com but that did not work out for me
[06:41:50] <The-Compiler> nik90: I've seen a Qt bug about it
[06:52:31] <Grange> Do I need to rewrite the sectionResized() method or something? I'm looking at this post (https://centaurialpha.github.io/resize-qheaderview-to-contents-and-interactive). He rewrote the `resizeEvent()` of the table. But I need this to happen when sections are resized, not the entire table. Could someone give me some hints?
[06:55:47] -!- BazookaTooth has quit [Remote host closed the connection]
[06:56:05] -!- BazookaTooth has joined #pyqt
[06:59:01] <nik90> The-Compiler: Yup, I saw it reported at https://bugreports.qt.io
[06:59:15] <nik90> The-Compiler: But, they think it is a PyQt bug due to way it destructs objects
[07:04:48] -!- mintograde has quit [Ping timeout: 252 seconds]
[07:09:08] -!- BPL has joined #pyqt
[07:22:50] -!- jthornton has quit [Quit: Leaving]
[07:25:18] <The-Compiler> nik90: I meant https://bugreports.qt.io
[07:42:33] -!- Belxjander has quit [Quit: AmigaOSv4.1.6+//PowerPC native]
[07:47:05] -!- Belxjander has joined #pyqt
[08:02:34] -!- nitro25 has joined #pyqt
[08:02:52] <Flaghacker> I've got a QFrame with a layout in it with a bunch of child widgets etc. Just doing .setAcceptDrops(True) on it, the application crashes when you drag something over it. It prints `TypeError: invalid argument to sipBadCatcherResult()` to stderr, no stacktrace or debugger-interceptable exception unfortunately. It doesn't matter whether without dragEnterEvent and dropEvent are overriden. I can't reproduce it with just an empty QFrame. Any ideas?
[08:10:47] <Grange> I think I finally managed to achieve it, by overwriting Headerview's `resizeEvent()` and connecting `sectionResized()` to a new function that handles resizing.
[08:11:53] <Grange> qt is so confusing
[08:12:31] <altendky> Grange: I'm not sure what functionality you want. You want the width automatically controlled but also user controlled?
[08:13:57] -!- kallesbar has joined #pyqt
[08:14:02] <altendky> Flaghacker: gdb with the python extra and then py-bt and report to maillist?
[08:14:29] <Grange> altendky, yes, automatically in the sense that expands to the full width of the widget space, controlled in the sense that you can drag to enlarge a certain column. For instance Column-1 is a year, Column-2 is a title, one may want to enlarge the title column
[08:15:42] <altendky> Grange: normally you pick one column to stretch
[08:16:39] <Grange> altendky, yes, but if I shrink one (to enlarge the next), all subsequent columns move and the total width shrink as well
[08:17:24] <altendky> Grange: the total width of all columns won't change if one is set to stretch
[08:18:18] <altendky> Well at least not to narrower than the widget
[08:18:29] <Grange> altendky, if `setSectionResizeMode(Stretch)` I actually can't shrink at all
[08:19:27] <altendky> Grange: shrink what? That column? That's the point. You are picking the column that qt can adjust to meet your desire of filling the width of the widget with columns
[08:21:08] <Grange> altendky, yes I meant shrink a table column, not the entire table
[08:21:29] <nik90> The-Compiler: ah...:/
[08:22:34] <altendky> Grange: so you want the user to control the width of all columns but qt to make sure the columns fill the width of the widget?
[08:22:53] -!- frispete has joined #pyqt
[08:23:19] <Grange> altendky, exactly
[08:23:45] <altendky> Grange: and how is qt supposed to do that if you are leaving control of all the widths to the user?
[08:24:27] <Grange> altendky, that's what I was after
[08:24:47] <altendky> Grange: but what is qt allowed to change to achieve what you want from it?
[08:25:02] <altendky> given that you want the user to be in control of everything
[08:25:55] <Grange> altendky, I guess that's what makes it confusing, I somehow made, even though I still don't quite understand how
[08:26:22] <altendky> Grange: when you drag to adjust a column width, what should change?
[08:26:24] -!- frispete_ has quit [Ping timeout: 252 seconds]
[08:26:42] <altendky> (and then the follow up is when the whole widget resizes, what should change)
[08:27:52] <Grange> altendky, when adjusting a column width, I first get a copy of all column widths. If column-I expands by x pixels, I shrink the next one by x, and all other keep as they were.
[08:28:49] <altendky> Grange: that sounds really annoying if you just want to make one column wider :] you have to adjust every column
[08:28:57] <Grange> when the whole widget resizes, I basically used the same thing as found here https://centaurialpha.github.io
[08:29:27] <Grange> altendky, I thought so, but haven't found any easy trick
[08:29:47] <altendky> Grange: normal qt functionality doesn't change the widths of other columns when you resize one
[08:29:56] <altendky> (other than the stretch column if you have one)
[08:30:31] <altendky> Grange: and using that resize to contents stuff will throw away any manual sizing whenever the overall widget is resized which doesn't sound great
[08:31:03] <altendky> Grange: i usually do a stretch column and resizetocontents for some columns where the data is small enough for that to usually make sense
[08:31:18] <altendky> though resize to contents can be quite slow at least with my pyqt model
[08:31:46] <altendky> Grange: what was it that you disliked before you started customizing the resizing?
[08:32:31] <Flaghacker> altendky, Is there something to get me started with that somewhere? I haven't used gdb before.
[08:32:50] <altendky> Flaghacker: https://wiki.python.org
[08:33:08] <altendky> Flaghacker: do make a minimal example. now window etc, just a frame/layout/single widget if that will recreate it
[08:33:14] <altendky> no .ui file
[08:33:27] <altendky> Flaghacker: also, maybe search the maillist
[08:33:41] <altendky> (and i'm assuming you are already running at least the latest wheel)
[08:34:17] <Flaghacker> altendky, It's one of those things that only seem to happen in specific orders and configuartions :/ I'll try to cut stuff out of my current program until it stops happening.
[08:34:20] <Flaghacker> altendky, wheel?
[08:35:02] <altendky> Flaghacker: yes, those things that are on pypi that you install such as `yourenv/bin/pip install pyqt5`
[08:35:31] <altendky> Flaghacker: https://pypi.org note the .whl extension
[08:35:47] <Grange> altendky, I was hoping that there could be some easy switches as I thought this seems to be a quite common use case
[08:35:50] <Flaghacker> altendky, Ah didn't know those were called wheels.
[08:36:19] <altendky> Grange: that to change one column size you must change them all manually?
[08:36:35] <altendky> Grange: in what case is that likely to be what someone wants?
[08:37:00] <altendky> Grange: what was it that you disliked before you started customizing the resizing?
[08:37:44] <Grange> altendky, the lack of easy switches, like `setSectionResizeMode(Stretch | Interactive)`
[08:37:58] <altendky> Grange: no, from a user perspective
[08:38:18] <altendky> Grange: making something automatic but manually controlled... it just isn't obvious who should be doing what when
[08:39:51] <altendky> Grange: do you understand the issue i'm point out? if i want the first column wider but most others to stay the same width, then i literally have to adjust every single column with what you have described. making the first column bigger like i want makes the second smaller which i didn't want. so i have to make the second bigger manually which makes the third smaller...
[08:39:57] <Grange> altendky, that's totally obvious. Say the email client, you have sender, subject, date, time, etc. subject could be the longest one, and you want to enlarge that. Say your file manager, you want to see more of the file names, less of file sizees.
[08:40:49] -!- nsizemor has joined #pyqt
[08:41:00] <altendky> Grange: i would generally expect the file name (for explorer) or email subject (for email) to be a stretch column.
[08:41:29] <altendky> Grange: they are the columns with fairly indefinite-length/long content so normally they should get as much space as possible.
[08:41:57] <altendky> Grange: other columns can be manually controlled but wanting more room for column A wouldn't really be related to wanting less room for column B
[08:42:21] <Grange> altendky, yes, but qt only let's you stretch the last column, doesn't it?
[08:42:29] <altendky> Grange: nope
[08:42:55] <Flaghacker> altendky, Turns out I wand't using the latest 'wheel', I was still on 4.5.4. I' glad I don't have to go about installing a bunch of debugger stuff. Thanks for the hint!
[08:43:19] <altendky> Flaghacker: uh... where did you get 4.5.4 from? isn't that like a decade old?
[08:43:23] <altendky> or more
[08:43:59] <altendky> Grange: what widget are you actually working with?
[08:45:11] <Flaghacker> altendky, Hmm wait I may have misread the update stuff. For some reason they're using conda here and its update stuff is ... strange.
[08:45:15] <Grange> altendky, QAbstractTableModel and QHeaderView
[08:45:19] <altendky> Grange: the_view.header().setSectionResizeMode(column, Stretch)
[08:45:44] <altendky> Grange: neither of those are the main widget but sure. set the section resize mode for the column you want
[08:46:02] <altendky> Grange: and just leave everything else alone probably :]
[08:46:12] <Grange> altendky, ok let me try it
[08:56:01] -!- Siecje has joined #pyqt
[08:59:40] <Grange> altendky, doesn't seem to work. If I shrink one column the entire table shrinks. My code is quite a mess atm, so probably messed up somewhere else
[09:01:59] -!- Grange has quit [Remote host closed the connection]
[09:09:10] -!- Grange has joined #pyqt
[09:09:14] -!- Grange has quit [Max SendQ exceeded]
[09:10:52] -!- SunyataZero has joined #pyqt
[09:15:28] -!- Grange has joined #pyqt
[09:15:46] <Grange> I dropped connection
[09:28:54] -!- agile_prg has joined #pyqt
[09:29:56] <Grange> altendky, could you help give a look at this https://paste.pound-python.org why my table is so small?
[09:30:19] <altendky> Grange: screenshot?
[09:30:40] <altendky> Grange: you've still got a custom header class
[09:32:23] <Grange> altendky, screenshot https://imgur.com
[09:33:13] <altendky> Grange: you didn't make a layout or put the widget in it
[09:34:52] <Grange> yep, my bad
[09:37:24] <Grange> altendky, So if I set `headerview.setSectionResizeMode(1, Stretch)`, I can drag column-1's left edge, but not the right edge, right?
[09:37:57] <altendky> Grange: i think you should be able to drag either but their effect may be different, i forget exactly
[09:38:12] <altendky> (assuming columns present on both left and right of 1
[09:38:43] <Flaghacker> altendky, Turns out I was already running the latest version, I was just confused by conda.
[09:38:58] <Flaghacker> altendky, And the problem was that I was doing something like this somewhere: https://paste.pound-python.org
[09:39:07] <altendky> Flaghacker: 5.11.2? i would recommend a regular old venv and pip install of pyqt5 for testing though
[09:39:27] <altendky> Flaghacker: hmm...
[09:39:40] <Flaghacker> Is this a bug I can report somewhere? The error message is _really_ bad.
[09:40:15] <Flaghacker> altendky, I'll do that next time, that's a better idea indeeed.
[09:41:42] <altendky> Flaghacker: well, you mucked with a C++ wrapper instance... i don't know how much fixing to expect. but maybe. i mean there's the maillist, that's where you'd report things.
[09:41:53] <Grange> altendky, it feels weird, I can't drag the right edge of the stretched column
[09:42:07] <altendky> Grange: code? are you still using your custom header?
[09:42:55] <Grange> altendky, no. code: https://paste.pound-python.org
[09:44:02] <altendky> Grange: why are you working in py2?
[09:44:17] <Flaghacker> altendky, I'll give it a shot I guess. Do I just go here and send a mail to everyone: https://www.riverbankcomputing.com
[09:44:33] <Grange> i have some legacy things
[09:44:46] <altendky> Grange: maybe at least `from __future__ import print_function`
[09:48:38] <altendky> Grange: ok, yes. that's a qt oddity. maybe look in qt bug tracker for reports to see if it's open or has an explanation. if you find something or submit something let me know. could also ask in #qt about that functionality and if it can be changed
[09:49:30] <altendky> Grange: other than that silliness :[ does the functionality seem good?
[09:50:10] <Grange> altendky, not sure, I gonna shower for now, I smell bad
[09:58:34] <Flaghacker> altendky, Nevermind the problem was that I was returning something from dragEnterEvent, overriding it like I did works just fine. No bug here at all :)
[10:04:17] -!- BazookaTooth has quit [Ping timeout: 256 seconds]
[10:05:04] -!- nik90 has quit [Quit: Konversation terminated!]
[10:05:09] -!- BazookaTooth has joined #pyqt
[10:07:08] -!- Grange has quit [Read error: Connection reset by peer]
[10:28:12] -!- mandeep has joined #pyqt
[10:46:37] -!- mandeep has quit [Quit: Leaving]
[10:57:59] -!- necrose99 has joined #pyqt
[11:03:54] -!- Flaghacker has quit [Quit: Leaving]
[11:39:29] -!- BazookaTooth has quit [Ping timeout: 256 seconds]
[11:39:45] -!- BazookaTooth has joined #pyqt
[11:39:58] -!- JanC has quit [Read error: Connection reset by peer]
[11:40:15] -!- JanC has joined #pyqt
[11:57:36] -!- jthornton has joined #pyqt
[12:53:43] -!- malachi has joined #pyqt
[13:11:58] -!- kallesbar has quit [Quit: Konversation terminated!]
[13:19:23] -!- kallesbar has joined #pyqt
[13:40:21] -!- jthornton has quit [Quit: Leaving]
[13:42:59] <Siecje> altendky: Are you still working on the qml plugin or are you stuck? Do you think it is worth asking the mailing list?
[13:43:31] <altendky> Siecje: sorry, i didn't do any more on it. if you have thoughts let me know. otherwise i'll get back to it... at some point :|
[13:43:54] <Siecje> No thoughts.
[13:44:38] <altendky> Siecje: just wishes? :] i mean i guess it'd be good to just build pyqt5 in its entirety and test it that way. i wonder if there's something fishy about building part of it separately.
[13:44:43] <altendky> i dunno
[13:45:16] <altendky> or an issue with a bit different version of sip since i'm building with a snapshot
[13:45:27] <Siecje> Oh that could be
[13:48:15] <altendky> Siecje: if you want to try a clean build on windows i can certainly try to help you work through that
[13:49:26] <altendky> Siecje: or we could go to the root of this and make a snapshot->repo converter followed by a full pyqt5 wheel builder followed by a test runner
[13:51:01] <Siecje> I don't have time now. I just didn't want it to lose steam.
[13:51:31] <altendky> Siecje: sorry :[ trying to do my first twisted review and keep it moving towards 3.7 support
[13:51:54] <Siecje> No worries.
[14:51:47] -!- kallesbar has quit [Ping timeout: 240 seconds]
[15:20:27] -!- malachi has quit [Ping timeout: 240 seconds]
[16:30:10] -!- nsizemor has quit [Quit: nsizemor]
[16:38:27] -!- nitro25 has quit [Remote host closed the connection]
[16:48:44] -!- mintograde has joined #pyqt
[17:53:24] -!- Siecje has parted #pyqt
[18:47:32] -!- jthornton has joined #pyqt
[18:53:22] -!- jthornton has quit [Quit: Leaving]
[19:38:36] -!- JanC has quit [Remote host closed the connection]
[19:48:41] -!- mandeep has joined #pyqt
[19:53:13] -!- JanC has joined #pyqt
[21:00:09] -!- ralsina has quit [*.net *.split]
[21:00:09] -!- _VV has quit [*.net *.split]
[21:00:10] -!- Avaris has quit [*.net *.split]
[21:03:56] -!- Avaris has joined #pyqt
[21:13:51] -!- BPL has quit [Quit: Leaving]
[21:31:55] -!- SunyataZero has quit [Ping timeout: 246 seconds]
[21:39:54] -!- mandeep has quit [Ping timeout: 244 seconds]
[21:52:03] -!- mandeep has joined #pyqt
[22:43:58] -!- necrose99 has quit [Ping timeout: 244 seconds]
[23:02:10] -!- altendky has quit [*.net *.split]
[23:29:41] -!- Sigyn has quit [*.net *.split]
[23:35:07] -!- Sigyn has joined #pyqt
[23:35:07] -!- mintograde has quit [Ping timeout: 244 seconds]
[23:54:43] -!- mandeep has quit [Ping timeout: 246 seconds]