Closed joshhting closed 6 years ago
Do you know how to fix the margin things on the rrt viewer that this commit messed up
My screen is a weird resolution so @jgkamat is going to fix it for normal people's screens.
The gui is a little off sync from the margin change, do you know how to call the qml properties from this line (I'd rather not hard code these values)
@joshhting I think you can call setMinimumSize(200, 200) for example but I don't know how that interacts with the seperate QML stylesheet, it may not actually change anything.
I mean do you know how to change the hardcoded values in the line I linked above to point to whatever the QML's values are
@joshhting have you tried size()? https://doc.qt.io/qt-5.10/qwidget.html#size-prop
Is the rrt still on qt4? The RRTWidget doesn't seem to have a size()...
RRTWidget is a subclass of QQuickPaintedItem, which you can use 'width' and 'height' on. It dosen't seem to be available right away in the constructor though, but it seems to be correct in the paint method.
Yeah I was confused as to why it wasn't working in the constructor
Working around the bug/feature where the dimensions are not available in the constructor seems too complicated for my level of Qt experience, so I'll leave it as a low priority issue for a more capable person. We could refactor it so that the part of the constructor that requires the width & height is called in some separate setupRRT() function that is called after the RRTWidget is initialized so that width() and height() work as expected, but I'm not sure how to reference the RRTWidget from the QMLApplicationEngine.
I'm going to merge this in on Wednesday if there are no complaints
Yay, :D
Partially addresses #86 and #74