Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. children
    Log in to post

    • SOLVED How to correctly subscribe to changes in QQuickItem::childItems?
      QML and Qt Quick • layout positioning children childitems itemchanged • • diredko  

      2
      0
      Votes
      2
      Posts
      382
      Views

      After looking through implementation of Qt positioners (qquickpositioners.* in qtdeclarative) I have found that the positioning itself is done in updatePolish method while in itemChange and onCompleted methods positioning is schedule and polish is called. At this point I don't completely understand how it works, but it resolved my problem and I didn't have to resort to using qt private modules.
    • UNSOLVED Segmentation fault when move a group item (combining a rectangle and a point) in pyQT
      General and Desktop • pyqt4 parent segmentation fa children python2 • • helloworld12345  

      4
      0
      Votes
      4
      Posts
      1453
      Views

      @jsulm When the pop up Message Box shows "python has stopped working", I clicked "debug" rather than close, then visual studio was started, in visual studio, it shows Unhandled exception at 0x0000000059A17DF1 (QtGui4.dll) in python.exe: 0xC000041D: An unhandled exception was encountered during a user callback I was using pycharm to trace code step by step, however it nev, aer run to this issue by step by step since there are two many small steps/callback/signal/slot to go through, as long as I let it run without breakpoint, it will crash with segmentation fault.
    • SOLVED Ownership with Q3DSurface
      General and Desktop • parent q3dsurface children destroy • • beecksche  

      3
      0
      Votes
      3
      Posts
      1094
      Views

      @Wieland Thanks for the informations! In the Surface Example they only delete the Q3DSurface instance. But i will pass the parents to the classes, so i can be sure, that they are destroyed. Thanks!
    • SOLVED How do I access the children of a repeater object in a function?
      QML and Qt Quick • qml javascript function repeater children • • dxmachina  

      5
      1
      Votes
      5
      Posts
      5816
      Views

      @dxmachina Well, that's not true ;) Just a little mistake. Happy coding! :D
    • UNSOLVED QML: Apply effect to all Grid children
      General and Desktop • qml grid children effect • • Mark81  

      1
      0
      Votes
      1
      Posts
      393
      Views

      No one has replied

    • UNSOLVED QWidget's children destruction mechanism
      General and Desktop • qwidget constructor children destroy • • alogim  

      4
      0
      Votes
      4
      Posts
      4608
      Views

      @alogim Hello, Unfortunately, no. To make use of the parent-child mechanism your object must derive from QObject at least. Search through the forum for "QObject" and "RAII", Here is a thread where I've put some effort in explaining the QObject ownership. Back to your question: class Object : public QObject { public: Object(QWidget * parent = 0) : QObject(parent) { } }; Will do what you want, i.e. delete the Object when the parent is destroyed. Then you indeed create your object like this: Object * obj = new Object(this); and it's sufficient to ensure proper cleanup. Kind regards.
    • [Solved] QGraphicsEffect not working on children
      General and Desktop • linux widget children qgraphicseffect • • ambershark  

      3
      0
      Votes
      3
      Posts
      1932
      Views

      Thanks for the reply. I wasn't using QtQuick so I couldn't use that as you suggested but I tried using the C++ equivalent and it acted the same as the property animation. After all the QPropertyAnimation pretty much just works on the QGraphicsOpacityEffect directly which is probably exactly what QtQuick uses under the hood to do it's opacity. Sorry for the delay in response I didn't realize the new forum system didn't email me when I got a response to a thread and I was busy enough with work not to check it. :) Also, I figured out what was causing it. It seems that I was using a QLabel with setAutoFillBackground(true) and the opacity effect couldn't handle that for some reason. When I removed that (I'll find another way to draw the background) it fades out properly. Just in case anyone else gets here from google.