by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    From IRC (bridge bot)
    @FromIRC
    <jpb> closer may be an overstatement. but it's not math and statistics. no need for numpy or any of that.
    Miloššš Korenčiak
    @milos-korenciak
    There are more ways how to draw some shapes in Qt. This one is more declarative way.
    Of course there is imperative classical way like:
    painter.drawRect(fromX, fromY, toX, toY)
    From IRC (bridge bot)
    @FromIRC
    <jpb> i will look at the heart example. might be similar enough.
    Miloššš Korenčiak
    @milos-korenciak
    From IRC (bridge bot)
    @FromIRC
    <jpb> my main idea is to graph some rectangles on a panel, and move then entire panel left wards on a timer. as new rectangles need to be drawn, they start at the right side.
    Miloššš Korenčiak
    @milos-korenciak
    OK, I will go, but for sure - 2D imperative drawing example: https://doc.qt.io/qtforpython/PySide2/QtGui/QPainter.html
    From IRC (bridge bot)
    @FromIRC
    <jpb> the animation will need to move the entire panel left by some amount.
    <jpb> ok, thanks for the links. i will check them.
    Miloššš Korenčiak
    @milos-korenciak
    Mh.. Is it going to be a 2D game? Because there are also game engines optimized for that.
    From IRC (bridge bot)
    @FromIRC
    <jpb> hehe, no, not a game, but it does sound like that now that i read what i wrote.
    <jpb> getting the pyside2 code is the first step
    Miloššš Korenčiak
    @milos-korenciak
    ;-) have a successful time. Now I need to go. Once it will be, maybe send me a link to github project.
    From IRC (bridge bot)
    @FromIRC
    <jpb> k, thx - bye
    Ogi Moore
    @j9ac9k

    I see there is some really experimental support for windows dark mode via qwidgets in 5.15.0 (see: https://doc.qt.io/qt-5/qguiapplication.html#platform-specific-arguments ).

    I'm unable to enable that, I'm trying to run my python script via python start.py -platform windows:darkmode=1 but that doesn't seem to work. I modified the shortcut to my generated .exe to include that -platform windows:darkmode=1 bit but that doesn't seem to have any effect either. I'm sure I'm missing something basic, any suggestions?

    Cristián Maureira-Fredes
    @cmaureir
    Sorry folks, I was a bit sick yesterday and stayed AFK, and couldn't follow the whole conversation. Did you manage to fix the issue regarding the DLL import on Windows @milos-korenciak ?
    @j9ac9k your QApplication declaration has a (sys.argv) inside, right?
    I wonder if again the problem with the darkmode will be the same problem we have with people installing with pip, and linux themes. Since we link to a locally ship Qt, that's not in touch with the System Qt, but I don't really know about how windows darkmode work
    From IRC (bridge bot)
    @FromIRC
    <xrogaan> Can I use positional argument with any qt function/method?
    <xrogaan> several overloads, can I call it like this? addAction(icon=X, text=Y)?
    <xrogaan> doesn't look like I can.
    <xrogaan> Yes, I want to write an object that builds the arguments so to reduce the amount of lines I have to type every time I want to add a stupid menu entry.
    Cristián Maureira-Fredes
    @cmaureir
    yeah, not possible. The whole decision tree for overloads would be affected, so I'm not sure how difficult could be to implement such thing, and co-exist well with the current keyword argument options we have for some options (for default parameters)
    From IRC (bridge bot)
    @FromIRC
    <xrogaan> a python wrapper around the thing?
    <xrogaan> python wrapper around a python wrapper. Wrapperception.
    <xrogaan> Anyhow, for this one: https://doc.qt.io/qt-5/qtreewidgetitem.html#setIcon
    <xrogaan> do I need a column dedicated to the icon?
    Miloššš Korenčiak
    @milos-korenciak
    @cmaureir Yes. The problem was in MS VC compiler / runtime installed. Updating it fixed the things. Strange is no problem occurs if you do NOT have have any M$ VC installed. :-)
    That's why only Win build machines had problems. Probably actual PySide2 v5.15 is compiled with the most up-to-date MS VC compiler and presence of older one makes failing the .dll loading.
    Other problem is PySide2 v5.15 DOES NOT work on Py3.8.0 . But this issue has nothing to do /w MS VC at all.
    Cristián Maureira-Fredes
    @cmaureir
    good to hear, thanks :)
    Ogi Moore
    @j9ac9k
    @cmaureir the dark theme issue is windows specific (haven't even attempted linux dark themes yet, one platform at a time :laughing: ) but yes, I do have sys.argv go into my QApplication() arguments. Again, this is documented as being highly experimental; but was mostly making sure that I wasn't doing anything wrong.
    Ogi Moore
    @j9ac9k
    @cmaureir just saw your update on the issue tracker, we realized the same thing, about to merge the relevant changes into our codebase.
    twelsh37
    @twelsh37
    Just want to chewcj. If i download pyside2 i am getting qt for python? is that right?
    check even
    Cristián Maureira-Fredes
    @cmaureir
    @twelsh37 yes, as stated in the websites: Qt for Python is the name of the project that host PySide, and Shiboken
    Webinar with the first introduction to the project: https://www.youtube.com/watch?v=wKqLaNqxgas
    @j9ac9k yeah, it was just me thinking on uic all the time :/ no idea why...but with pyside2-uic everything will be better, at least for people using the wheels, Idk what people from the diff distros will do :)
    Cristián Maureira-Fredes
    @cmaureir
    @ctismer My first attempt was to just use the implementation from Python 3 to check the GIL state, but when I started "porting" new structures and functions to make it work, I decided to take a step back and went for checking only the Global and Local ThreadState to make a difference with the main thread and others to avoid trying to release the GIL from secondary threads.
    Christian Tismer
    @ctismer
    @cmaureir Then it should not be put into the public pep384impl, or it needs a bit thought to be really equivalent in all cases.
    so this works only in a subset of cases? Then it should get another name, which calls into the existing gilstate_check when available. I'm also a bit reluctant to use this fix. Finally, it should be possible to avoid the situation, instead of fixing it... Do you know exactly already when this happens?
    Cristián Maureira-Fredes
    @cmaureir
    secondary threads have access to the GIlState class, so I don't see how this could be skipped
    The situation is quite simple:
    Main thread (1) holds the GIL,
    Secondary thread (2) is spawn and uses Qt-related functions (due to events, or something else)
    Secondary thread will end up in the GilState destructor, and will check if the m_locked is true, it's because the thread (1) hold and will try to release the GIL with m_gstate, but m_gstate is the enum UNLOCKED. Then everything explodes.
    Since only the interpreter thread (1) needs to hold and release the GIL, the function is just to skip the secondary threads (2) to attempt it.
    I agree that a different name is required, so we avoid confusion for people that know the exact behavior of PyGILState_Check
    Cristián Maureira-Fredes
    @cmaureir
    I think renaming this "helper" function will be enough :)
    Christian Tismer
    @ctismer
    yes, fine :) (Although I was keen to have it...)
    Cristián Maureira-Fredes
    @cmaureir
    yeah it's a really nice function
    I wonder why is not supported by the Limited API
    :(
    Christian Tismer
    @ctismer
    yeah, they must be paranoid or have never used that API.