0

I probably should post this in multiple questions.

I need to know two things, I have a simple window that all it has is a button within it, set like so:

self.spherize = QtGui.QPushButton("Spherize")

I'm just wondering how to set the height of this button?

I've tried the following but it didn't work:

self.spherize.setHeight(50)

Also, where can I find propper docs for things like this with example code?

4

2 回答 2

3

这是PyQT 文档QPushButton,但它继承自QAbstractButtonQWidget具有更改小部件大小的方法。

你想要的电话是QWidget.setFixedHeight。所以你想要这样的东西:

self.spherize.setFixedHeight(50)
于 2013-09-05T04:10:39.723 回答
1

这是PySide文档。

于 2013-09-18T04:24:45.093 回答