Returns a read only buffer object pointing to the segment of data that this resource represents. If the resource is compressed the data returns is compressed and qUncompress() must be used to access the data. If the resource is a directory None is returned. Creates a model index for the given row and column with the internal pointer ptr. When using a QSortFilterProxyModel, its indexes have their own internal pointer. It is not advisable to access this internal pointer outside of the model. Use the data() function instead. This function provides a consistent interface that model subclasses must use to create model indexes. .. warning:: Because of some Qt/Python itegration rules, the ptr argument do not get the reference incremented during the QModelIndex life time. So it is necessary to keep the object used on ptr argument alive during the whole process. Do not destroy the object if you are not sure about that. To find the child of a certain QObject, the first argument of this function should be the child's type, and the second the name of the child: :: ... parent = QWidget() ... # The first argument must be the child type child1 = parent.findChild(QPushButton, "child_button") child2 = parent.findChild(QWidget, "child_widget") Like the method *findChild*, the first parameter should be the child's type. Replaces every occurrence of the regular expression in *sourceString* with *after*. Returns a new Python string with the modified contents. For example: :: s = "Banana" re = QRegExp("a[mn]") s = re.replace(s, "ox") # s == "Boxoxa" For regular expressions containing capturing parentheses, occurrences of \1, \2, ..., in *after* are replaced with rx.cap(1), cap(2), ... :: t = "A <i>bon mot</i>." re = QRegExp("<i>([^<]*)</i>") t = re.replace(t, "\\emph{\\1}") # t == "A \\emph{bon mot}." .. class:: QCoreApplication(args) Constructs a Qt kernel application. Kernel applications are applications without a graphical user interface. These type of applications are used at the console or as server processes. The *args* argument is processed by the application, and made available in a more convenient form by the :meth:`~QCoreApplication.arguments()` method. .. warning:: QSettings.value can return different types (QVariant types) depending on the platform it's running on, so the safest way to use it is always casting the result to the desired type, e.g.: int(settings.value("myKey")) <code>machine = QStateMachine() s1 = QState() s11 = QState(s1) s12 = QState(s1) s1h = QHistoryState(s1) s1h.setDefaultState(s11) machine.addState(s1) s2 = QState() machine.addState(s2) button = QPushButton() # Clicking the button will cause the state machine to enter the child state # that s1 was in the last time s1 was exited, or the history state's default # state if s1 has never been entered. s1.addTransition(button.clicked, s1h)</code>