I have a subclassed widget that I paint on. What I want to do is is click on a zoom in button and have the widget expand horizontally. Right now what happens is I click on zoom in and the widget stays the same size. Here is a snippet of what I am currently doing with the resizing.
{
setGeometry(0,0,base_width,base_height);
}
Chart::set_resize(int w, int h)
{
resize(size);
}
Chart::Chart(QWidget *parent) : QWidget(parent)
{
setSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Expanding);
setGeometry(0,0,base_width,base_height);
}
Chart::set_resize(int w, int h)
{
QSize size(w,h);
resize(size);
}
To copy to clipboard, switch view to plain text mode
What am I doing wrong?
Any suggestions?
Thank You
Bookmarks