Saturday, July 5th 2008, 1:15pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Thursday, November 15th 2007, 4:25am

stylesheet example not working correctly

I cut and pasted the evil button example from the trolltech doc pages.
http://doc.trolltech.com/4.3/stylesheet-…pecific-widgets

QPushButton#evilButton {
background-color: red;
border-style: outset;
border-width: 2px;
border-radius: 10px;
border-color: beige;
font: bold 14px;
min-width: 10em;
padding: 6px;
}
QPushButton#evilButton:pressed {
background-color: rgb(224, 0, 0);
border-style: inset;
}

I pasted it into the stylsheet for the button. It worked sort of. The web example shows a red button with a border. Mine looks the same except there is a red rectangle behind the button.

The author did not specify what system he was using.

I'm using Ubuntu 7.04 and QT designer 4.2.3.

I played with it quite a bit and I'm sure I understand the style sheet concept. It is very cool. However it does not seem to be working correctly.

I realize this is a trivial example but I'm still evaluating QT designer along with other options.

If anyone can help clear this up I'd really appreciate it.
  • Go to the top of the page

2

Monday, November 19th 2007, 3:03pm

RE: stylesheet example not working correctly

I am having a similar problem. The button appears correctly in Designer, but none of the coloring appears when I compile and launch the application.

-John
  • Go to the top of the page

Rate this thread