Hi all,
I've made a class based on QWidget and it needs another QWidget as parent.
Map::Map( QWidget *parent ) : QWidget(parent)
To copy to clipboard, switch view to plain text mode
Now I designed a window in QtDesigner and I subclassed the ui code and on a frame that I placed using QtDesigner the map is placed:
map = new Map(ui.frameMain);
map = new Map(ui.frameMain);
To copy to clipboard, switch view to plain text mode
Next step would be to draw on the map using the paint event. However.. if I draw a line from the topleft to bottomright corner of the map it only takes up a small part of the parent (the frame).
How can I make the map always use the available space of the frame?
Thanks in advance!
Rob
ps. I tried setSizePolicy(QSizePolicy::Expanding,QSizePolicy:: Expanding); in the constructor but that didn't work
Bookmarks