Results 1 to 4 of 4

Thread: Customization of QGraphicsItem based applications.

  1. #1
    Join Date
    Dec 2008
    Location
    My spaceship needs repairs..so, I am stuck on beautiful earth
    Posts
    98
    Thanks
    25
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Red face Customization of QGraphicsItem based applications.

    Hi everyone,
    It's been a while since I worked on Qt and honestly, I have almost forgotten whatever little I knew
    A friend asked me this question and since I have no clue about it,so, I thought I would raise the question here and hope you guys will be able to give some suggestions.

    His question was 'How do we customise the look and feel (font colour etc)of QGraphicsItem based applications without modifying the application code'?
    He also said that Qstyle based customisation is available for QWidget based applications to change the look and feel without modifying the code.But,QStyle won't work for QGraphicsItem based applications.

    So,is there any way to change the font,background colour etc of a QGraphicsItem based application without modifying the code?

    Thanks in advance for any advice.
    Last edited by rishiraj; 27th August 2009 at 14:17.
    If everything seems to be going well, you have obviously overlooked something.

  2. #2
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Customization of QGraphicsItem based applications.

    Hi

    As far as I know, there is no way to do this which makes much more sense than if there was.

  3. #3
    Join Date
    Dec 2008
    Location
    My spaceship needs repairs..so, I am stuck on beautiful earth
    Posts
    98
    Thanks
    25
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Customization of QGraphicsItem based applications.

    Hi,
    thanks for the reply.
    I read the tolltech docs on QStyle yesterday and found this-
    "The Qt Plugin system makes it possible to create styles as plugins. Styles created as plugins are loaded as shared objects at runtime by Qt itself.
    Compile your plugin and put it into Qt's plugins/styles directory. We now have a pluggable style that Qt can load automatically. To use your new style with existing applications, simply start the application with the following argument:

    ./myapplication -style custom.

    The application will use the look and feel from the custom style you implemented."

    I guess that's what my friend meant when he talked about using Qstyle on QWidgets( to make changes in colour etc )without any changes being made in the actual application's code.Is it possible to implement something similar for QGraphicsItem based applications?Or,any other way it might be possible?

    Thanks for any advice.
    If everything seems to be going well, you have obviously overlooked something.

  4. #4
    Join Date
    Feb 2008
    Posts
    98
    Thanks
    2
    Thanked 24 Times in 24 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Customization of QGraphicsItem based applications.

    QStyle paint widgets with the look they want. Think of Windows, Oxygen in KDE or Mac OS X. They have different looks because there are different QStyles for them. But that applies to the look of the widgets, not their contents. A QStyle has no control over what is painted INSIDE of a QGraphicsView.

  5. The following user says thank you to victor.fernandez for this useful post:

    rishiraj (31st August 2009)

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.