[Qt-interest] QTabWidget rotates tab icons in east or west direction
David Boosalis
david.boosalis at gmail.com
Thu Oct 1 07:51:05 CEST 2009
Maybe you can just fool the TabWidget by doing your own rotation
first. Here is a piece of demo code that does that, you'll have to do
the math to figure out what angle to apply to get it right. Hope it
helps
#include <QApplication>
#include <QLabel>
#include <QPixmap>
#include <QTransform>
class MyLabel : public QLabel
{
public:
MyLabel( QWidget * p = 0, Qt::WindowFlags f = 0 ): QLabel(p,f)
{
QPixmap pm("test.png");
QTransform trans;
pm = pm.transformed(trans.rotate(-90));
setPixmap(pm);
}
};
int main(int argc, char *argv[])
{
QApplication app(argc,argv);
MyLabel *myLabel = new MyLabel();
myLabel->show();
return app.exec();
}
On Tue, Sep 29, 2009 at 7:25 AM, Thomi Richards <thomir at gmail.com> wrote:
> Hi,
>
>
> I have a QTabWidget, with tabs on the east side of the widget. I
> notice that it rotates the icons according to the direction of the
> tabs. For me, this is undesirable behaviour, but I cannot find any way
> to turn this off. Is there something I'm missing?
>
>
> Cheers,
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list