[Interest] QStyle on QToolbox

David Heremans david.heremans at intersoft-electronics.com
Thu Jan 22 11:31:06 CET 2015


I must be missing something here, so if somebody could help me out...

I'm creating an application that needs to be run on both Windows and Linux
and in Windows the default tabs of a QToolbox look like ordinary
rectangular
pushbuttons, while the default on Linux is the more elegant fusion style.

I'm trying to set the tabs of of QToolBox to be in fusion style without
doing
the common QApplication setStyle(QStyleFactory::create("Fusion")) for
the entire program.
Changing the entire application works but I only want the Qtoolbox tabs
so I tried in my custom QWidget constructor

ui->setupUi(this);
ui->toolBox->setStyle(QStyleFactory::create("Fusion"));
ui->toolBoxPage1->setStyle(QStyleFactory::create("Fusion"));
ui->toolBoxPage2->setStyle(QStyleFactory::create("Fusion"));
ui->toolBoxPage3->setStyle(QStyleFactory::create("Fusion"));

but the tabs remain the ugly square rectangles...

After googling around I still have no clue as to the cause of this.
Anybody here knows a solution for my problem?

Thanks,

David H

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3692 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150122/abb7b94e/attachment.bin>


More information about the Interest mailing list