125 for (
int i = 0; i <
d->createdWidgets.count(); ++i)
129 d->createdWidgets.clear();
131 delete d->defaultWidget;
144 if (widget ==
d->defaultWidget ||
d->defaultWidgetInUse)
146 delete d->defaultWidget;
152 d->defaultWidget->hide();
153 d->defaultWidget->setParent(0);
154 d->defaultWidgetInUse =
false;
156 d->defaultWidget->setEnabled(
false);
165 return d->defaultWidget;
183 if (
d->defaultWidgetInUse || !
d->defaultWidget)
185 d->defaultWidget->setParent(parent);
186 d->defaultWidgetInUse =
true;
187 return d->defaultWidget;
192 d->createdWidgets.append(w);
208 if (widget ==
d->defaultWidget) {
209 d->defaultWidget->hide();
210 d->defaultWidget->setParent(0);
211 d->defaultWidgetInUse =
false;
215 if (!
d->createdWidgets.contains(widget))
220 d->createdWidgets.removeAll(widget);
231 if (
d->defaultWidget)
233 for (
int i = 0; i <
d->createdWidgets.count(); ++i)
234 d->createdWidgets.at(i)->setEnabled(
isEnabled());
283 return d->createdWidgets;
288 #include "moc_qwidgetaction.cpp" 290 #endif // QT_NO_ACTION
bool event(QEvent *)
Reimplemented Function
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
The QObject class is the base class of all Qt objects.
#define QT_BEGIN_NAMESPACE
This macro expands to.
void destroyed(QObject *=0)
This signal is emitted immediately before the object obj is destroyed, and can not be blocked...
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
virtual bool eventFilter(QObject *, QEvent *)
Filters events if this object has been installed as an event filter for the watched object...
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
QObject * parent() const
Returns a pointer to the parent object.
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Q_OUTOFLINE_TEMPLATE void qDeleteAll(ForwardIterator begin, ForwardIterator end)
void deleteLater()
Schedules this object for deletion.
The QAction class provides an abstract user interface action that can be inserted into widgets...