Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Luc Touraille
    @stilllman

    Hey there! I'm working with a qt and qt for python built from source (5.15.3) and I hit the following assert in Debug on Windows when importing any PySide2 module:

    Assertion failed: _PyGCHead_REFS(gc) != 0, file c:\a\18\s\modules\gcmodule.c, line 277

    Any idea what could be going wrong?

    From IRC (bridge bot)
    @FromIRC
    <delvian> Hi All. Does anybody know of a good QtQuick/QML tutorial?
    <delvian> The official docs seem a bit unorganized to me and has a few broken links. And some of the examples don't work.
    Sivan Grünberg
    @sivang
    <delvian> this is a tutorial I really liked by a cool guy from ICS: https://www.youtube.com/watch?v=Zna1KHQj_8Y
    delvian: ^
    From IRC (bridge bot)
    @FromIRC
    <delvian> @sivang: Thanks :⁠)
    Sivan Grünberg
    @sivang
    delvian: you're most welcome, this has a nifty little booklet with the slides and some extra commentary they gave us there, but I don't know if there's a PDF version of that somewhere but the lecture is good (note there's also part 2 so somewhat comprehensive)
    luzpaz
    @luzpaz

    is there a way to put animated gifs within a tooltip ?

    (repost)

    hckjck0
    @hckjck0:matrix.org
    [m]
    I want to implement a list of elements which are able to hold widgets. Would QAbstractItemView be the way to go?
    Yesserdz
    @Yesserdz
    Hi Developers i want a clear example with an explanation of how to link QSqlTableModel and python and qml and fill in qtableview in qml
    Till Stensitzki
    @Tillsten
    Make one?
    luzpaz
    @luzpaz
    @cmaureir :+1:
    From IRC (bridge bot)
    @FromIRC
    <The-Compiler> sahumada: I don't think so, those examples were taken from Qt 5
    Cristián Maureira-Fredes
    @cmaureir
    exactly, webengine should be available for 6.2. if you have a dev qt built with support for qtwebengine it should work, but afaik it's WIP
    From IRC (bridge bot)
    @FromIRC
    <shimbles> do you guys have any instructions for building qt + pyside from scratch
    <shimbles> i am on ubuntu
    <shimbles> also where can I find XCB_XPRINT XCB_XEVIE
    Matthias Kuhn
    @m-kuhn

    Hi, we are trying to port QGIS (a rather large Qt base application) to PySide2

    We are running into an issue with "allocating an object of abstract type ..."

    qt-for-python/qgis/core/qgsmaplayer_wrapper.cpp:1289:35: error: allocating an object of abstract class type '::QgsMapLayerWrapper'
                    cptr = new (addr) ::QgsMapLayerWrapper();
                                      ^
    ../src/core/qgsmaplayer.h:942:18: note: unimplemented pure virtual method 'readSymbology' in 'QgsMapLayerWrapper'
        virtual bool readSymbology( const QDomNode &node, QString &errorMessage,
                     ^

    Most messages of this type could be eliminated by adding classes required for the function signature to the type system. In this case here, this doesn't seem to help.

    Here's the method signature
    https://github.com/opengisch/QGIS/blob/qt-for-python-qt5/src/core/qgsmaplayer.h#L942-L943

    And here the corresponding type system xml
    https://github.com/opengisch/QGIS/blob/qt-for-python-qt5/qt-for-python/qgis/typesystem_qgis_core.xml#L102-L105

    Interestingly there's also another method bool render(); which shows the same, so I'm tempted to believe it's related to the boolean return type. Does this sound plausible, are there other suspicions ... And ideally, how can we solve that.

    Thanks in advance for any hint

    Gentle ping @cmaureir

    Matthias Kuhn
    @m-kuhn
    The problem disappeared after changing some other things, not sure what it was but we can go further now.
    From IRC (bridge bot)
    @FromIRC
    <SirGambleot> Hello, quick question, Has QWebSocket been ported to Pyside6 yet?
    Matthias Kuhn
    @m-kuhn

    We are facing another Problem now

    Situation, two classes A and B with inheritance and the subclass overrides with a more specific return value

    class A
    {
      virtual A *clone() const;
    }
    
    class B : public A
    {
      B *clone() const override;
    }

    The compiler fails with

    b_wrapper.h:47:19: error: invalid covariant return type forvirtual A* B::clone() const

    Apparently it creates the subclass override with the parent signature, is that expected?

    Christian Tismer-Sperling
    @ctismer
    Matthias Kuhn
    @m-kuhn
    @ctismer thanks for pointing this out. We have updated this file, I should have linked to a specific commit, not a branch
    I'm still struggling to find a solution for the invalid covariant return type
    Cristián Maureira-Fredes
    @cmaureir
    hey @m-kuhn sorry I couldn't connect to gitter during the weekend, mmm it might be a bug but did you check the shiboken tests?
    I see a class called MDerived which doesn't requires a special treatment for the override methods :/
    Cristián Maureira-Fredes
    @cmaureir

    I modified one of our examples, with a similar structure:

    virtual Icecream *clone() const;  // icecream.h
    Icecream2 *clone() const override // icecream2.h (inherits from icecream)

    and I don't have any compilation error.

    stonebig
    @stonebig
    dreaming of a Pyside6 version or my pypy3.7-v7.3.5-win64.
    Matthias Kuhn
    @m-kuhn

    Thank you for cross checking @cmaureir

    It went away after realizing that it this class was twice in the typesystem xml and that it was also having a pure virtual which couldn't be generated for the subclass.

    Sorry for the questions, it's quite hard to get started with a big project due to the cascading nature of types being used as dependencies, for every warning/error one fixes by including more types, some new ones pop up. I'll try to properly research before asking again

    Cristián Maureira-Fredes
    @cmaureir
    @m-kuhn not a big deal, your feedback is really valuable, so we know what to explain, and improve!
    Please drop all the questions you have here. When working with Shiboken, it's better to dive into the test cases from the repo: https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/shiboken6/tests Also if you find missing bits of information from the docs: https://doc.qt.io/qtforpython/shiboken6/index.html pleaaaaaase let us know :)
    @stonebig there is support for PyPy cooking, but I'm not sure how much time it will stay in the oven :P but at least the ball is rolling
    Matthias Kuhn
    @m-kuhn

    Heh, thanks for encouraging.

    One thing in the docs: https://doc.qt.io/qtforpython/shiboken6/typesystem_specifying_types.html#enum-type

    It lists flags="yes | no" for enum-type whereas it's used with flags="<typename>"e.g. here: https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/pyside6/tests/pysidetest/typesystem_pysidetest.xml#n65

    Matthias Kuhn
    @m-kuhn
    And another thing, the following output is likely the reason for build failures. It's in the generator log for several classes/enums. But there is not much information for the underlying problem in the log. If it would be possible to have some hints where to look, that would help a lot.
    type '[SomeTypeNameHere]' is specified in typesystem, but not defined. This could potentially lead to compilation errors.
    enum 'Class::EnumName' is specified in typesystem, but not declared.
    From IRC (bridge bot)
    @FromIRC
    <shimbles> I am interested in streaming a video of the usage of my application, from the application itself. Is Qt capable of this?
    stonebig
    @stonebig
    @cmaureir thanks. I tried to release a big distro with PyPy3 last week-end. could include 60% of packages from a standard cPython, but missing all Qt ecosystem, and Jupyter ecosystem because jupyter-core uses two functions of pywin32.... so close , but maybe 4 weeks away
    stonebig
    @stonebig
    cgohlke did all the pre-work of doing PyPy3 32 bit wheels since about 6 month or more.
    From IRC (bridge bot)
    @FromIRC
    <bomex> hello
    <bomex> where can I find PySide6 source code?
    Christian Tismer-Sperling
    @ctismer
    @stonebig You are trying PyPy3 on Windows? I tackled it on macOS and get crashes since a while.
    Ogi Moore
    @j9ac9k
    pyside6 team, congratulations on the release; I'm really excited about some of the numpy functionality you're adding, I'm not so interested in the QtChart related stuff, but the QPainter.drawPointsNp bit caught my attention (I'm a pyqtgraph maintainer). Do you all have plans/hopes of expanding more numpy -> Qt data structure functionality in other QPainter/QPainterPath methods?
    stonebig
    @stonebig
    @cstiner I build a full distro 60 % of package, just I can't succeed to understand how to compile pywin32
    I can publish if you're interested, it's based on pypy3.7-v7.3.5rc2-win64. was waiting of a rc3
    stonebig
    @stonebig
    I did basic tests, my prefered being trying to run a notebook, see winpython/winpython#982
    Christian Tismer-Sperling
    @ctismer
    @stonebig did you compile PySide with PyPy3 and did it run?
    stonebig
    @stonebig
    compiling is my weak domain, so no. I rely on Christoph Gohlke's wheels for anything complex
    Cristián Maureira-Fredes
    @cmaureir
    @j9ac9k sorry I missed your message. I think we can totally do it breaking the API and having our own *Np methods, at least it's easier. Do you have other methods in mind? maybe something that's heavily used by pyqtgraph? feel free to open Suggestions on JIRA mentioned which other methods deserve a better integration
    Ogi Moore
    @j9ac9k
    @cmaureir we're in very different time-zones, no need to apologize. I'll have to check the library for some specifics, we built our own function for attempting to get fast numpy array -> QPainterPath; unfortunately the QPainterPath is invalid/invisible if there is one (or more) np.NaN values in the numpy array (this was new behavior in Qt 5.12.3) so having to screen for NaN values and fill them in was an unfortunate performance hit we had to take; would be great if we don't have to do that check at least (I can certainly open an issue in JIRA with specifics/reproducible code).