Results 1 to 4 of 4

Thread: Property Editor doesn't work!

  1. #1
    Join Date
    Jul 2012
    Posts
    6
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Property Editor doesn't work!

    Hello,
    I tried to change the color of QLabel's text by changing the windowtext'color of the UI in the property editor.I could see the color of the text.color change,But when I run the application, the label's color goes back to the default "black"!How can I make the attribute work?

  2. #2
    Join Date
    Apr 2012
    Location
    Bali - Indonesia
    Posts
    9
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Property Editor doesn't work!

    Hi

    You could do that by edit the style sheet.

    Qt Code:
    1. {
    2. border-width: 2px;
    3. border-radius: 10px;
    4. border-color: black; //put your color here
    5. font: bold 9px;
    6. padding: 6px;
    7. }
    To copy to clipboard, switch view to plain text mode 

    Regards,

    Mardi

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Property Editor doesn't work!

    Quote Originally Posted by æž—å©· View Post
    Hello,
    I tried to change the color of QLabel's text by changing the windowtext'color of the UI in the property editor.I could see the color of the text.color change,But when I run the application, the label's color goes back to the default "black"!How can I make the attribute work?
    Start by finding why it doesn't work. Is your UI file properly included in your project? Is your application being rebuilt when you modify the UI? Does anything else modify the label properties in the code? Have you applied a style sheet anywhere in your program?

  4. #4
    Join Date
    Mar 2012
    Location
    china
    Posts
    54
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Property Editor doesn't work!

    It is better to use Qt style sheet,,,

Similar Threads

  1. pixmap filepath in property editor
    By purga in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2009, 13:49
  2. Is there any property editor to use in my program?
    By Morea in forum Qt Programming
    Replies: 2
    Last Post: 25th December 2008, 18:21
  3. QT Designer like property editor
    By dosto.walla in forum Qt Tools
    Replies: 2
    Last Post: 24th October 2008, 00:13
  4. Property editor fully featured?
    By brcain in forum Qt Tools
    Replies: 14
    Last Post: 20th September 2006, 15:57
  5. Replies: 5
    Last Post: 16th May 2006, 20:38

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.