zoukankan      html  css  js  c++  java
  • pyqt signal slot

    Now let’s look at the general syntax for connections. We assume that the PyQt
    modules have been imported using the from …import * syntax, and that s and
    w are QObjects, normally widgets, with s usually being self.
    s.connect(w, SIGNAL("signalSignature"), functionName)
    s.connect(w, SIGNAL("signalSignature"), instance.methodName)
    s.connect(w, SIGNAL("signalSignature"),
    instance, SLOT("slotSignature"))
    The signalSignature is the name of the signal and a (possibly empty) commaseparated
    list of parameter type names in parentheses. If the signal is a Qt signal,
    the type names must be the C++ type names, such as int and QString. C++
    type names can be rather complex, with each type name possibly including one
    or more of const, *, and &. When we write them as signal (or slot) signatures we
    can drop any consts and &s, but must keep any *s. For example, almost every
    Qt signal that passes a QString uses a parameter type of const QString&, but in
    PyQt, just using QString alone is sufficient. On the other hand, the QListWidget
    has a signal with the signature itemActivated(QListWidgetItem*), and we must
    use this exactly as written.

    from rapid pyqt tut 

  • 相关阅读:
    一条SQL的执行流程
    LinkedList源码解析
    MinorGC前检查
    AbstractList源码分析
    JVM常用命令
    CountDownLatch源码解析
    ReentrantLock源码解析
    HTTPS简单介绍
    工厂方法模式
    观察者模式
  • 原文地址:https://www.cnblogs.com/rdRoad/p/1605039.html
Copyright © 2011-2022 走看看