Results 1 to 11 of 11

Thread: how to change backgroup color, button color and shape?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2008
    Posts
    15
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: how to change backgroup color, button color and shape?

    Thanks everyone for the reply.

    Yes, i tried to change metalColor, and the button colors changed. But i am not clear why there are 5 colors in metalColor?
    I will need to find out how to change the shape of the buttons.
    How about the background style and color? Can you tell me which part code is related to that?
    Thanks.

    Sorry for posting the question twice.

  2. #2
    Join Date
    Dec 2007
    Posts
    129
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default Re: how to change backgroup color, button color and shape?

    i think you should "search" your question first in the forum and experiment. There are related threads to your question.

  3. #3
    Join Date
    Jun 2008
    Posts
    15
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: how to change backgroup color, button color and shape?

    I looked at marble.xpm, it is the backgroup style. I tried to get another image file 'style.xmp'. I included this file at the top and changed the following code
    QPixmap background(marble_xpm);
    to
    QPixmap background(style_xpm);
    But i got an error ' undeclared identifier'
    I even tried to back up the marble.xpm file and renamed style.xmp to marble.xmp and i still got ' undeclared identifier' error.
    could anyone please tell me which part i am missing?
    Thanks

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: how to change backgroup color, button color and shape?

    Are u not confusing between xpm and xmp ??

    By the way, I guess renaming a xpm file doesnt work. Open a xpm file with notepad, and you will see some char[] = {}; defined. The name of this char is used I guess.
    Am not sure how you are using the xpm, but this is the reason i can guess. Check the name of the xpm in notepad ( filename and char[] name)

    Hope it helps

  5. #5
    Join Date
    Jun 2008
    Posts
    15
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: how to change backgroup color, button color and shape?

    Thank you for the reply. I do not know what xmp is (have i typed xmp before?), but my program is using xpm. You are right the name is saved at the beginning of the xpm file. With a new xpm file, i can change the background style.


    Quote Originally Posted by aamer4yu View Post
    Are u not confusing between xpm and xmp ??

    By the way, I guess renaming a xpm file doesnt work. Open a xpm file with notepad, and you will see some char[] = {}; defined. The name of this char is used I guess.
    Am not sure how you are using the xpm, but this is the reason i can guess. Check the name of the xpm in notepad ( filename and char[] name)

    Hope it helps

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.