Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
added style_and_theme - using css to control style example
- Loading branch information
Shuge Lee
committed
May 13, 2012
1 parent
ea56428
commit bc52edb
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
Qt Style Sheet | ||
""" | ||
import sys | ||
from PySide import QtGui | ||
|
||
app = QtGui.QApplication(sys.argv) | ||
|
||
win = QtGui.QWidget() | ||
x, y, w, h = 100, 100, 200, 50 | ||
win.setGeometry(x, y, w, h) | ||
|
||
label = QtGui.QLabel("hello", win) | ||
label.move(10, 10) | ||
|
||
|
||
css = "QLabel { border: 1px solid red; color: blue; }" | ||
win.setStyleSheet(css) | ||
|
||
win.show() | ||
win.raise_() | ||
|
||
sys.exit(app.exec_()) |