Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
using qt designer i create qwidget which include a graphicview box. how do i add item such as rect etc to this view in c++?
also anyway to auto resize the graphicview inside teh qwidget when i expand/shrink the main window?
@s002wjh Hi You can access the graphicview via the UI variable if a normal Creator/Designer created form.
somethign like ui->graphviewname->
but how would i add rect? i usually use scene->additem(rect) but since graphicview is part of widget now. so i guess i use qpaint to draw rect in graphicview?
Hi,
Just as usual, create a scene and set it on your ui->graphviewname.
ui->graphviewname
@SGaist
thanks i made a stupid mistake by setScene before ui->setupUI(this), so it crash.