Hi,
Sorry for posting same question again. Actually I did it because there was a spelling mistake in the subject line of earlier post.
I want to apply external stylesheet to qtopia application using .qss file. I tried doing it using setStyleSheet function. Following is my code. If I use Qapplication instead of QtopiaApplication, it works. It seems external style sheet can't be set to qtopia application using setStyleSheet function. Is it true?
#include <QFile>
#include <QtopiaApplication>
#include "dialogimpl.h"
//
QSXE_APP_KEY
int main(int argc, char ** argv)
{
QSXE_SET_APP_KEY(argv[0]);
QtopiaApplication app( argc, argv );
QFile qss
("/home/stylesheet.qss");
qss.
open(QFile::ReadOnly);
app.setStyleSheet(qss.readAll());
qss.close();
DialogImpl win;
win.show();
app.connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
return app.exec();
}
#include <QFile>
#include <QtopiaApplication>
#include "dialogimpl.h"
//
QSXE_APP_KEY
int main(int argc, char ** argv)
{
QSXE_SET_APP_KEY(argv[0]);
QtopiaApplication app( argc, argv );
QFile qss("/home/stylesheet.qss");
qss.open(QFile::ReadOnly);
app.setStyleSheet(qss.readAll());
qss.close();
DialogImpl win;
win.show();
app.connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks