Results 1 to 3 of 3

Thread: how to apply stylesheet to qtopia application using qss file

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to apply stylesheet to atopia application using qss file

    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?



    Qt Code:
    1. #include <QFile>
    2. #include <QtopiaApplication>
    3. #include "dialogimpl.h"
    4. //
    5. QSXE_APP_KEY
    6. int main(int argc, char ** argv)
    7. {
    8. QSXE_SET_APP_KEY(argv[0]);
    9. QtopiaApplication app( argc, argv );
    10.  
    11. QFile qss("/home/stylesheet.qss");
    12. qss.open(QFile::ReadOnly);
    13. app.setStyleSheet(qss.readAll());
    14. qss.close();
    15.  
    16. DialogImpl win;
    17. win.show();
    18. app.connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
    19. return app.exec();
    20. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by jpn; 31st March 2008 at 07:46. Reason: missing [code] tags

Similar Threads

  1. Replies: 4
    Last Post: 28th March 2008, 04:55
  2. Replies: 8
    Last Post: 17th March 2008, 14:04
  3. how to apply qt css to qtopia application
    By namita in forum Qt Programming
    Replies: 1
    Last Post: 3rd March 2008, 12:19
  4. Replies: 3
    Last Post: 6th March 2007, 18:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.