开发者

Pyqt command line options

I cannot find any references to command line arguments for pyqt, 开发者_如何学Csuch as:

-style windows -background "yellow"

I've only found a couple by accident.

Hasn't helped to Google it or use Qt Assistant. (Unless it's well hidden)

Thanks,

Paul


From the PyQt4 manual entry for QApplication: (http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qapplication.html)

All Qt programs automatically support the following command line options:

-style= style, sets the application GUI style. Possible values are motif, windows, and platinum. If you compiled Qt with additional styles or have additional styles as plugins these will be available to the -style command line option.

-style style, is the same as listed above.

-stylesheet= stylesheet, sets the application styleSheet. The value must be a path to a file that contains the Style Sheet. Note: Relative URLs in the Style Sheet file are relative to the Style Sheet file's path.

-stylesheet stylesheet, is the same as listed above.

-session= session, restores the application from an earlier session.

-session session, is the same as listed above. -widgetcount, prints debug message at the end about number of widgets left undestroyed and maximum number of widgets existed at the same time

-reverse, sets the application's layout direction to Qt.RightToLeft

-graphicssystem, sets the backend to be used for on-screen widgets and QPixmaps. Available options are raster and opengl.

-qmljsdebugger=, activates the QML/JS debugger with a specified port. The value must be of format port:1234[,block], where block is optional and will make the application wait until a debugger connects to it.

The X11 version of Qt supports some traditional X11 command line options:

-display display, sets the X display (default is $DISPLAY).

-geometry geometry, sets the client geometry of the first window that is shown.

-fn or -font font, defines the application font. The font should be specified using an X logical font description. Note that this option is ignored when Qt is built with fontconfig support enabled.

-bg or -background color, sets the default background color and an application palette (light and dark shades are calculated).

-fg or -foreground color, sets the default foreground color.

-btn or -button color, sets the default button color.

-name name, sets the application name.

-title title, sets the application title.

-visual TrueColor, forces the application to use a TrueColor visual on an 8-bit display.

-ncols count, limits the number of colors allocated in the color cube on an 8-bit display, if the application is using the QApplication.ManyColor color specification. If count is 216 then a 6x6x6 color cube is used (i.e. 6 levels of red, 6 of green, and 6 of blue); for other values, a cube approximately proportional to a 2x3x1 cube is used.

-cmap, causes the application to install a private color map on an 8-bit display.

-im, sets the input method server (equivalent to setting the XMODIFIERS environment variable)

-inputstyle, defines how the input is inserted into the given widget, e.g., onTheSpot makes the input appear directly in the widget, while overTheSpot makes the input appear in a box floating over the widget and is not inserted until the editing is done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜