Navigation

    Qt Forum

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

    • SOLVED Qwt plot inside QDialog inside QWidget?
      3rd Party Software • qwidget qdialog qwt parent • • pauledd  

      2
      0
      Votes
      2
      Posts
      122
      Views

      ok, stupid me! I forgot to include Qwt in the *.pro file: ... CONFIG += qwt INCLUDEPATH +="/usr/include/qwt" LIBS += -L/usr/lib -lqwt
    • SOLVED Handing events from children to parent widget?
      General and Desktop • event parent click child passing • • m1212e  

      8
      0
      Votes
      8
      Posts
      1874
      Views

      @jsulm Okay, that helped me a lot. Thank you very much!
    • UNSOLVED Creating widgets in "another" thread...
      General and Desktop • qwidget qthread parent qeventloop • • Dariusz  

      17
      0
      Votes
      17
      Posts
      1697
      Views

      @Dariusz Sorry to make a post to just confirm what @SGaist has said above, but 20 * 75 == 1,500-odd line edits average. That's a lot! (And I pity the user who has to fill those in ;-) ) I think the suggestion that you look at the possibility of some kind of table instead needs reiterating. And @VRonin will then be here to ensure that you achieve this using item delegates instead of widgets in your table, so it will all be fast and not use up too much memory/resources ;-)
    • SOLVED Slideshow style item navigation with zooming in of current item
      QML and Qt Quick • embedded animation imx6 parent slideshow • • dv__  

      8
      0
      Votes
      8
      Posts
      1731
      Views

      Hmm good catch! Although it turns out that I can't flick the list, because the items require some custom mouse move handling ... which reduces it to a non-interactive PathView. So, solved I guess! Thanks for pointing out the Tumbler though, and I hope my examples prove to be useful to others.
    • UNSOLVED Quitting, assert runtime error - child, parent
      General and Desktop • qml c++ parent assert childitems • • olivierguzziIDEOL  

      3
      0
      Votes
      3
      Posts
      2398
      Views

      main.qml - What is the top level item ? Is it window or Item ? loginform.qml - What is top level item ? Is it window or Item ? This is typical issue of object deleted already is getting delete due to parent child relation ship ?
    • 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.
    • UNSOLVED QListWidgtem(Item) parent and child
      General and Desktop • parent qlistwidgetitem child • • Meugiwara  

      7
      0
      Votes
      7
      Posts
      2451
      Views

      @VRonin Oh and you provide a model based solution. Much more elegant :) https://forum.qt.io/topic/72974/link-two-qlistwidget/4
    • UNSOLVED new Signal/Slot syntax with parent QWidget?
      General and Desktop • signal & slot connect parent syntax • • pauledd  

      10
      0
      Votes
      10
      Posts
      3640
      Views

      thanks for the enlightening!
    • SOLVED how to parent qpainter (code) to QTabWidget (Design Mode)
      General and Desktop • qtablewidget qpainter qt5.6 qmainwindow parent • • pauledd  

      13
      0
      Votes
      13
      Posts
      5396
      Views

      @pauledd :) class MyWidget : public QWidget << yes that is subclassing :) Also, a widget can only paint on it self. its not possible to paint on other widget from inside a paintevent. Thats why the first sample didnt work. You asked painter to paint on tab from inside mainwindows paintEvent :) I guess you already found out but its just to make clear for other readers.
    • 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 allocate short-living widgets on the heap or the stack?
      General and Desktop • widgets memory parent • • Justin Sayne  

      11
      0
      Votes
      11
      Posts
      4370
      Views

      @Chris-Kawa This is to ensure there's only one instance of it Ah, yes, I completely slept through this minor detail ... :$ Sure you could do something like this instead No thanks, I'll take your QPointer suggestion any day. The latter is ... well it's work-aroundishly ugly ... Sorry about that. Not at all, I agree with the "premature optimization is the root of all evil" stance I just didn't see the proximate cause for it here, that's all. ... hard to get wrong. This is what I always liked about the stack, as I'm lazy and don't like debugging bad code ... especially if it's mine ... ;)
    • SOLVED Adding QWidget to layout of other QWidget without reparenting
      General and Desktop • qwidget layout parent • • Joel Bodenmann  

      3
      0
      Votes
      3
      Posts
      1129
      Views

      @Chris-Kawa said: A simple fix is to set the parent back to null when you no longer need the widget e.g. after you call settingsApply(). Well that gets the job done. I was wondering whether there was a better / proper solution to this. Thank you for your help! I appreciate it a lot!
    • SOLVED How to rename a child with only parent index known in a treeview ?
      General and Desktop • qtreeview parent index child • • Ratzz  

      3
      0
      Votes
      3
      Posts
      1052
      Views

      @kshegunov Thanks for your reply. Yes retrieving the child model via child and then setting data worked for me .
    • SOLVED How does QSpacerItem get deleted?
      General and Desktop • parent space destructor • • alogim  

      8
      0
      Votes
      8
      Posts
      3535
      Views

      @SGaist It happens even to the best ... at the very least we both support it, so that has to account for something ;)
    • UNSOLVED Add another application into another as a QWidget?
      General and Desktop • qwidget parent child • • pauliedunne  

      2
      0
      Votes
      2
      Posts
      749
      Views

      Hi, Isn't that pretty much the same question as here ?
    • UNSOLVED How to get the height and the width of the MainWindow::MainWindow(QWidget *parent) ?
      General and Desktop • mainwindow parent height width • • Touchoco  

      3
      0
      Votes
      3
      Posts
      13753
      Views

      Besides what @Rondog mentions, you could also read about layouts http://doc.qt.io/qt-5.5/designer-layouts.html If you assign a layout to the window, and put the tab in it, Qt can then automatically adjust the size if user resize the window. It takes a little bit to learn layouts but the reward is great.
    • [Solved] QAbstractItemModel parent() implementation
      General and Desktop • qtreeview qabstractitemmo parent • • Joel Bodenmann  

      21
      0
      Votes
      21
      Posts
      6888
      Views

      In order to be future-proof I implemented the abstract node based concept as suggested by @Chris-Kawa and @Harb (in the first post). Everything is working nicely. Thanks for your help!
    • QDialog always on top if parented on QMainWindow
      General and Desktop • qmainwindow qdialog parent • • Justin Sayne  

      4
      0
      Votes
      4
      Posts
      5008
      Views

      Yes my bad, I pointed you to the wrong property. Actually you must set the windowModality property : http://doc.qt.io/qt-5/qwidget.html#windowModality-prop, or the modal prop (only for QDialogs) : http://doc.qt.io/qt-5/qdialog.html#modal-prop. I believe that is the solution you've been looking for.
    • QObject delete order in multi-threaded application
      General and Desktop • threads parent delete destroy • • s.frings74  

      4
      0
      Votes
      4
      Posts
      1532
      Views

      @SGaist said: Hi, @SysTech : deleteLater won't remove things when the thread is done, but at the next event loop iteration. Thanks. I wasn't exactly sure when it deleted it but good to know!
    • When to setParent on injected QObjects?
      General and Desktop • qobject parent child • • shavera  

      6
      0
      Votes
      6
      Posts
      2525
      Views

      @Chris-Kawa That's a valid point I hadn't considered. I'll just have to give this some more thought. It seems like maybe the most "Qt-correct" design would be to override childEvent(QChildEvent* event) to take the pointer into the member object when a child is added to the parent object. This would then, at least, bypass the need to call "findChild" over and over again.
    • Error: working with QThreads
      General and Desktop • error parent qthreads • • SujaMM  

      4
      0
      Votes
      4
      Posts
      1160
      Views

      I fix this problem with signals and slots, but I firts create what a call a log, and after one minute a close that log. I'm getting this error while closing the log QEventLoop::exec: instance 0x8d4418 has already called exec()