#pyqt | Logs for 2019-01-11

Back
[00:22:28] -!- mandeep has joined #pyqt
[01:39:52] -!- kallesbar has joined #pyqt
[03:02:38] -!- anqxyr has joined #pyqt
[03:05:20] -!- anqxyr has quit [Client Quit]
[03:51:14] -!- BPL has joined #pyqt
[05:04:54] -!- anqxyr has joined #pyqt
[06:38:49] -!- BPL has quit [Read error: Connection reset by peer]
[06:39:16] -!- BPL has joined #pyqt
[07:55:08] -!- russw has quit [Read error: Connection reset by peer]
[08:09:16] -!- BPL has quit [Read error: Connection reset by peer]
[08:10:04] -!- BPL has joined #pyqt
[08:45:43] -!- Siecje has joined #pyqt
[09:25:38] -!- JanC has quit [Remote host closed the connection]
[09:26:00] -!- JanC has joined #pyqt
[10:09:46] -!- BPL has quit [Read error: Connection reset by peer]
[10:10:37] -!- BPL has joined #pyqt
[13:02:19] -!- _plasma has joined #pyqt
[13:04:24] <_plasma> heyo. I'm trying to learn PyQt5 and I think I'm not understanding something basic. I want to create a pop-up hint window that shows up and displays content when focus is entered in a custom QWidget. I have it showing up as a parent of Qt, but when it shows up it steals focus away from my QWidget. https://pastebin.com
[13:04:35] <_plasma> anyone want to point me in the right direction?
[13:05:09] <altendky> _plasma: do you need it custom? or would a tooltip work?
[13:05:40] <_plasma> @altendky: I think a tooltip only shows up for mouse hover. I'm trying to make something akin to code hinting in an IDE. When you start typing tags for a bookmark it'll show suggestions, as you type
[13:07:16] <altendky> _plasma: perhaps looking at examples related to http://doc.qt.io could lead somewhere useful, in case there's a not-totally-custom solution
[13:07:30] <_plasma> Cool, thanks
[13:08:03] <_plasma> though it sounds like this is more about completing text as you type it, rather than showing a list of suggestions, at first glance
[13:08:38] <altendky> _plasma: wouldn't a list be a group of completion options?
[13:09:17] <_plasma> would it? I supose, though I don't have a problem showing the items, just getting the window/widget to pop up in a way that doesn't steal focus from the QLineInput
[13:10:11] <altendky> _plasma: my point is that this is a tool related to the activity you are doing. if you look for uses of it you may (or may not) find a good example of or a ready-to-use thing to show the list
[13:10:17] <altendky> http://doc.qt.io
[13:10:33] <altendky> rather than just trying to guess all the proper things you need to tweak and such
[13:11:24] <_plasma> ah, I see, the photo is different than what I was picturing from the first link
[13:11:52] <altendky> _plasma: the first link is not gui anything, it's entirely backend. have data, have text, decide what completions might be desired.
[13:12:26] <altendky> _plasma: when you look places that is used, you might find front-end gui widgets specifically for the task, or examples of how to use 'regular' widgets
[13:12:49] <_plasma> Thanks, I'll look around to see what implements it
[13:12:50] <altendky> _plasma: but more directly https://stackoverflow.com
[13:13:22] <altendky> _plasma: is the listbox in the example what you wanted?
[13:14:00] <_plasma> ha, I actually found that page before but I don't think I tried it
[13:14:37] <_plasma> I had put in a QScrollArea inside a QVBoxLayout, and it was displaying a list of items well enough for me to continue
[13:15:13] <altendky> _plasma: what is the end target?
[13:15:21] <_plasma> ohoo ShowWithoutActivating works!
[13:15:39] <altendky> _plasma: a list box with text items? maybe made to look fancy?
[13:15:40] <_plasma> the end result I want? Basically like when you type in an IDE and a frameless window shows up and gives you hints of what to type
[13:15:45] <_plasma> yea basically
[13:15:53] <_plasma> probably unscrollable and uninteractable, maybe 5 items or so
[13:16:51] <altendky> _plasma: i'd look at what the example does. i assume you can configure a QCompleter as to how many results to give you (or only care about 5) and tweak the listbox to look how you want
[13:17:36] <_plasma> that's probably a faster way than my plan, which was to listen for keypress events and relbale QLabels on the fly
[13:19:56] <_plasma> part of the problem is I'm using vim with YouCompleteMe, and the completions for PyQt5 are weirdly incomplete
[13:20:18] <The-Compiler> something something incompletions
[13:20:41] <altendky> _plasma: aren't the stubs provided by someone else?
[13:21:11] <altendky> though i spend most of my time looking for things in the docs. maybe someday i'll get my act together and try to use, and fix, my completions
[13:21:35] <The-Compiler> altendky: there's https://github.com but that's mainly intended for mypy, PyQt (or sip, rather) can generate stubs which are better suited for completions even
[13:21:53] <altendky> The-Compiler: but are they in the wheel?
[13:22:10] <altendky> or do i need to add then to pyqt5-tools or somesuch :[
[13:22:37] <altendky> speaking of which, i think pyqt5qmlscene is working (there's also pyqt5qmltestrunner but i haven't tried it at all)
[13:23:13] <The-Compiler> looks like jedi (which YCM uses) doesn't do stubs yet: https://github.com
[13:25:10] <altendky> https://ci.appveyor.com yeah, `pyqt5qmlscene --run-qml-example` works for me at least. now to make the test qml for ci
[14:18:14] -!- kallesbar has quit [Quit: Konversation terminated!]
[14:27:11] <Siecje> altendky: This is what you are effectively calling qmlscene on? https://github.com
[14:34:31] <altendky> Siecje: i did just make that ugly stupid example today, yes. russw and i were testing on the pie chart thingy from the pyqt examples
[14:34:45] <Siecje> Is there Python?
[14:34:59] <altendky> Siecje: Text is in qmltext.py
[14:35:15] <altendky> Siecje: that example is only there so you can --run-qml-example and see it work
[14:35:39] <Siecje> Nice!
[14:36:00] <altendky> Siecje: yep, russ did the leg work and i stuck it into pyqt5-tools
[14:36:23] <altendky> basically just shotgun paths into all the env vars
[14:36:30] <altendky> shove sys.path everywhere, etc
[14:36:39] <altendky> maybe in the future we'll make it less insane
[14:37:11] <Siecje> Oh your custom Type is called Text.
[14:37:16] <Siecje> That is not a great name.
[14:37:33] <Siecje> rename it to Title?
[14:37:57] <altendky> Siecje: not meant to be good, just meant to show it works so people can focus on fixing their own thing. but, PRs welcome? get your name in on the project... :]
[14:37:58] <Siecje> There is already http://doc.qt.io
[14:38:16] <altendky> i was mostly surprised it was ok and actually used my thing
[14:38:39] <altendky> could be PyQt5ToolsExample or whatever
[14:39:44] <Siecje> for qmltestrunner you could do something like https://dpaste.de
[14:40:30] <altendky> Siecje: thanks. you sure you don't want to be a contributor?
[14:40:44] * altendky grins
[14:41:23] <Siecje> actually you probably need a function https://dpaste.de
[14:42:56] <Siecje> I'm not on Windows to test anything.
[15:31:24] -!- mandeep has quit [Remote host closed the connection]
[15:42:28] -!- rocketmagnet has joined #pyqt
[15:42:32] <rocketmagnet> hi all
[15:42:40] <rocketmagnet> how can i run the pyqt5 designer ?
[15:42:57] <rocketmagnet> or does i have to use the qt4 designer with the module for the version 5 ?
[15:43:24] <altendky> rocketmagnet: what os? certainly you can run latest designer
[15:44:13] <rocketmagnet> debian stable
[15:44:30] <rocketmagnet> there is no package for qt5-designer
[15:45:03] <rocketmagnet> only for version 4 and the python3-pyqt5 package only finds an .so file with the name designer in it
[15:45:42] <rocketmagnet> how to run the designer anyway (also the version 4) ?
[15:46:12] <altendky> rocketmagnet: qttools5-dev-tools
[15:46:46] <altendky> rocketmagnet: i don't know about a pre-compiled designer plugin though. i have pyqt5-tools but it's windows only so far (despite me working in linux 99% of the time)
[15:47:12] <altendky> i know others have compiled the plugin for linux though
[15:48:50] <altendky> rocketmagnet: actually, python3-pyqt5 has /usr/lib/x86_64-linux-gnu/qt5/plugins/designer/libpyqt5.so
[15:48:59] <altendky> not sure if it needs to be moved or not
[15:49:26] <altendky> rocketmagnet: shows up in my designer5 widget list
[15:56:57] <rocketmagnet> thank you
[15:57:15] <altendky> rocketmagnet: i was trying to get my widgets to show. no luck yet. i'll have to fiddle more later
[15:58:40] <rocketmagnet> but adding a window with html content must be done by hand right ?
[15:59:03] <altendky> rocketmagnet: a web engine widget?
[15:59:24] <altendky> rocketmagnet: or just a text view or whatever, they can do some basic html
[15:59:48] <rocketmagnet> yes i mean the webengine widget
[16:00:27] <altendky> rocketmagnet: you can get latest designer from qt last i checked. i believe the installer forces you to install the tools, which doesn't include designer... and you have to choose to install a particular qt/compiler option to get designer
[16:00:45] <rocketmagnet> i do some kind of music search tool and the search results must be displayed as html content
[16:00:50] <altendky> rocketmagnet: oh, and there's https://launchpad.net
[16:01:25] <altendky> i forget how well that does or doesn't work with debian
[16:04:12] <rocketmagnet> thanks alot
[16:05:08] <rocketmagnet> that was all i needed to know
[16:21:51] <rocketmagnet> how to install the man pages ?
[16:22:07] <altendky> rocketmagnet: no clue
[16:22:21] <rocketmagnet> k
[16:22:23] <altendky> rocketmagnet: what do you need to read about?
[16:37:20] -!- anqxyr has quit [Read error: Connection reset by peer]
[16:40:45] -!- BPL has quit [Read error: Connection reset by peer]
[16:41:17] -!- BPL has joined #pyqt
[17:06:31] -!- Siecje has parted #pyqt
[17:24:27] -!- mintograde has joined #pyqt
[17:25:19] <_plasma> @altendky et al., I had great luck with the QCompleter. Now I'm trying to figure out how to complete on a word-by-word basis, splitting with space as the delimeter
[17:31:16] <_plasma> damn, I got two books on Safari for PYQT5 and neither talk about QCompleter
[17:31:31] <_plasma> maybe just QT will suffice
[17:39:43] -!- mandeep has joined #pyqt
[19:21:01] -!- BPL has quit [Quit: Leaving]
[19:59:46] -!- Guest59094 has joined #pyqt
[20:09:21] -!- Guest59094 has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
[20:11:24] -!- daegontaven has joined #pyqt
[22:55:12] -!- mintograde has quit [Ping timeout: 246 seconds]