30 Apr 17:46
Re: QwtScaleWidget has wrong scale
From: Rainer Thaden <RThaden <at> web.de>
Subject: Re: QwtScaleWidget has wrong scale
Newsgroups: gmane.comp.graphics.qwt.general
Date: 2008-04-30 15:46:53 GMT
Subject: Re: QwtScaleWidget has wrong scale
Newsgroups: gmane.comp.graphics.qwt.general
Date: 2008-04-30 15:46:53 GMT
Hi again, maybe this one is a bit hard to understand and differs in your case: > > Then, > > thermoLayout = new QVBoxLayout(); > int margin=thermoLevel->scaleMargin(); > thermoLevel->setMinimumSize(QSize(48, 170-2*margin)); > thermoLayout->setContentsMargins(0, margin, 0, margin); > thermoLayout->addWidget(thermoLevel); > gridLayout->addLayout(thermoLayout, 1, 1, 1, 1); > > > Thus, you shrink the colour-bar to fit the scale. > It means, add a Layout around the thermo (colourbar) and set the top and bottom margins to the same values as the scale reserves for the numbers. In your case, you have to ask your free standing scale for its margins and apply them to the VBox the colourbar is in. So, the colourbar is shrunk to the same size as your actual scale. Hope, it's getting clear, now. Regards, Rainer ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
RSS Feed