QtBase  v6.3.1
qdialogbuttonbox.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2016 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the QtWidgets module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 3 requirements
23 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24 **
25 ** GNU General Public License Usage
26 ** Alternatively, this file may be used under the terms of the GNU
27 ** General Public License version 2.0 or (at your option) the GNU General
28 ** Public license version 3 or any later version approved by the KDE Free
29 ** Qt Foundation. The licenses are as published by the Free Software
30 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31 ** included in the packaging of this file. Please review the following
32 ** information to ensure the GNU General Public License requirements will
33 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34 ** https://www.gnu.org/licenses/gpl-3.0.html.
35 **
36 ** $QT_END_LICENSE$
37 **
38 ****************************************************************************/
39 
40 #include <QtCore/qhash.h>
41 #include <QtWidgets/qpushbutton.h>
42 #include <QtWidgets/qstyle.h>
43 #include <QtWidgets/qlayout.h>
44 #include <QtWidgets/qdialog.h>
45 #include <QtWidgets/qapplication.h>
46 #include <private/qwidget_p.h>
47 #include <private/qguiapplication_p.h>
48 #include <QtGui/qpa/qplatformdialoghelper.h>
49 #include <QtGui/qpa/qplatformtheme.h>
50 #include <QtGui/qaction.h>
51 
52 #include "qdialogbuttonbox.h"
53 
55 
152 {
153  Q_DECLARE_PUBLIC(QDialogButtonBox)
154 
155 public:
157 
160 
165  bool center;
166 
167  void createStandardButtons(QDialogButtonBox::StandardButtons buttons);
168 
169  void layoutButtons();
170  void initLayout();
171  void resetLayout();
173  void addButton(QAbstractButton *button, QDialogButtonBox::ButtonRole role, bool doLayout = true);
175  void _q_handleButtonClicked();
176  void addButtonsToLayout(const QList<QAbstractButton *> &buttonList, bool reverse);
177  void retranslateStrings();
178 };
179 
181  : orientation(orient), buttonLayout(nullptr), internalRemove(false), center(false)
182 {
183 }
184 
186 {
187  Q_Q(QDialogButtonBox);
189  bool createNewLayout = buttonLayout == nullptr
190  || (orientation == Qt::Horizontal && qobject_cast<QVBoxLayout *>(buttonLayout) != 0)
191  || (orientation == Qt::Vertical && qobject_cast<QHBoxLayout *>(buttonLayout) != 0);
192  if (createNewLayout) {
193  delete buttonLayout;
195  buttonLayout = new QHBoxLayout(q);
196  else
197  buttonLayout = new QVBoxLayout(q);
198  }
199 
200  int left, top, right, bottom;
204 
205  if (!q->testAttribute(Qt::WA_WState_OwnSizePolicy)) {
207  if (orientation == Qt::Vertical)
208  sp.transpose();
209  q->setSizePolicy(sp);
210  q->setAttribute(Qt::WA_WState_OwnSizePolicy, false);
211  }
212 }
213 
215 {
216  //delete buttonLayout;
217  initLayout();
218  layoutButtons();
219 }
220 
222  bool reverse)
223 {
224  int start = reverse ? buttonList.count() - 1 : 0;
225  int end = reverse ? -1 : buttonList.count();
226  int step = reverse ? -1 : 1;
227 
228  for (int i = start; i != end; i += step) {
229  QAbstractButton *button = buttonList.at(i);
231  button->show();
232  }
233 }
234 
236 {
237  Q_Q(QDialogButtonBox);
238  const int MacGap = 36 - 8; // 8 is the default gap between a widget and a spacer item
239 
240  for (int i = buttonLayout->count() - 1; i >= 0; --i) {
242  if (QWidget *widget = item->widget())
243  widget->hide();
244  delete item;
245  }
246 
247  int tmpPolicy = layoutPolicy;
248 
249  static const int M = 5;
252  if (tmpPolicy == QDialogButtonBox::MacLayout) {
253  bool hasModalButton = false;
254  for (int i = 0; i < M; ++i) {
255  if (!buttonLists[ModalRoles[i]].isEmpty()) {
256  hasModalButton = true;
257  break;
258  }
259  }
260  if (!hasModalButton)
261  tmpPolicy = 4; // Mac modeless
262  }
263 
264  const int *currentLayout = QPlatformDialogHelper::buttonLayout(
265  orientation, static_cast<QPlatformDialogHelper::ButtonLayout>(tmpPolicy));
266 
267  if (center)
269 
271 
272  while (*currentLayout != QPlatformDialogHelper::EOL) {
273  int role = (*currentLayout & ~QPlatformDialogHelper::Reverse);
274  bool reverse = (*currentLayout & QPlatformDialogHelper::Reverse);
275 
276  switch (role) {
278  if (!center)
280  break;
282  if (acceptRoleList.isEmpty())
283  break;
284  // Only the first one
285  QAbstractButton *button = acceptRoleList.first();
287  button->show();
288  }
289  break;
291  if (acceptRoleList.size() > 1)
292  addButtonsToLayout(acceptRoleList.mid(1), reverse);
293  break;
295  {
297 
298  /*
299  Mac: Insert a gap on the left of the destructive
300  buttons to ensure that they don't get too close to
301  the help and action buttons (but only if there are
302  some buttons to the left of the destructive buttons
303  (and the stretch, whence buttonLayout->count() > 1
304  and not 0)).
305  */
306  if (tmpPolicy == QDialogButtonBox::MacLayout
307  && !list.isEmpty() && buttonLayout->count() > 1)
308  buttonLayout->addSpacing(MacGap);
309 
310  addButtonsToLayout(list, reverse);
311 
312  /*
313  Insert a gap between the destructive buttons and the
314  accept and reject buttons.
315  */
316  if (tmpPolicy == QDialogButtonBox::MacLayout && !list.isEmpty())
317  buttonLayout->addSpacing(MacGap);
318  }
319  break;
327  addButtonsToLayout(buttonLists[role], reverse);
328  }
329  ++currentLayout;
330  }
331 
332  QWidget *lastWidget = nullptr;
333  q->setFocusProxy(nullptr);
334  for (int i = 0; i < buttonLayout->count(); ++i) {
336  if (QWidget *widget = item->widget()) {
337  if (lastWidget)
338  QWidget::setTabOrder(lastWidget, widget);
339  else
340  q->setFocusProxy(widget);
341  lastWidget = widget;
342  }
343  }
344 
345  if (center)
347 }
348 
350  bool doLayout)
351 {
352  Q_Q(QDialogButtonBox);
353  int icon = 0;
354 
355  switch (sbutton) {
358  break;
361  break;
364  break;
367  break;
370  break;
373  break;
376  break;
379  break;
382  break;
385  break;
388  break;
391  break;
394  break;
397  break;
400  break;
403  break;
406  break;
409  break;
411  return nullptr;
412  ;
413  }
414  QPushButton *button = new QPushButton(QGuiApplicationPrivate::platformTheme()->standardButtonText(sbutton), q);
415  QStyle *style = q->style();
416  if (style->styleHint(QStyle::SH_DialogButtonBox_ButtonsHaveIcons, nullptr, q) && icon != 0)
417  button->setIcon(style->standardIcon(QStyle::StandardPixmap(icon), nullptr, q));
418  if (style != QApplication::style()) // Propagate style
420  standardButtonHash.insert(button, sbutton);
423  qWarning("QDialogButtonBox::createButton: Invalid ButtonRole, button not added");
424  else
425  addButton(button, static_cast<QDialogButtonBox::ButtonRole>(role), doLayout);
426 #if QT_CONFIG(shortcut)
427  const QKeySequence standardShortcut = QGuiApplicationPrivate::platformTheme()->standardButtonShortcut(sbutton);
428  if (!standardShortcut.isEmpty())
429  button->setShortcut(standardShortcut);
430 #endif
431  return button;
432 }
433 
435  bool doLayout)
436 {
437  Q_Q(QDialogButtonBox);
440  buttonLists[role].append(button);
441  if (doLayout)
442  layoutButtons();
443 }
444 
445 void QDialogButtonBoxPrivate::createStandardButtons(QDialogButtonBox::StandardButtons buttons)
446 {
448  while (i <= QDialogButtonBox::LastButton) {
449  if (i & buttons) {
451  }
452  i = i << 1;
453  }
454  layoutButtons();
455 }
456 
458 {
460 
461  const Iterator end = standardButtonHash.end();
462  for (Iterator it = standardButtonHash.begin(); it != end; ++it) {
464  if (!text.isEmpty())
465  it.key()->setText(text);
466  }
467 }
468 
476 {
477 }
478 
485  : QWidget(*new QDialogButtonBoxPrivate(orientation), parent, { })
486 {
487  d_func()->initLayout();
488 }
489 
499  : QDialogButtonBox(buttons, Qt::Horizontal, parent)
500 {
501 }
502 
509 QDialogButtonBox::QDialogButtonBox(StandardButtons buttons, Qt::Orientation orientation,
510  QWidget *parent)
511  : QDialogButtonBox(orientation, parent)
512 {
513  d_func()->createStandardButtons(buttons);
514 }
515 
520 {
521 }
522 
527 
550 
648 {
649  return d_func()->orientation;
650 }
651 
653 {
654  Q_D(QDialogButtonBox);
655  if (orientation == d->orientation)
656  return;
657 
658  d->orientation = orientation;
659  d->resetLayout();
660 }
661 
668 {
669  Q_D(QDialogButtonBox);
670  // Remove the created standard buttons, they should be in the other lists, which will
671  // do the deletion
672  d->standardButtonHash.clear();
673  for (int i = 0; i < NRoles; ++i) {
674  QList<QAbstractButton *> &list = d->buttonLists[i];
675  while (list.count()) {
676  QAbstractButton *button = list.takeAt(0);
677  QObject::disconnect(button, SIGNAL(destroyed()), this, SLOT(_q_handleButtonDestroyed()));
678  delete button;
679  }
680  }
681 }
682 
689 {
690  Q_D(const QDialogButtonBox);
691  QList<QAbstractButton *> finalList;
692  for (int i = 0; i < NRoles; ++i) {
693  const QList<QAbstractButton *> &list = d->buttonLists[i];
694  for (int j = 0; j < list.count(); ++j)
695  finalList.append(list.at(j));
696  }
697  return finalList;
698 }
699 
707 {
708  Q_D(const QDialogButtonBox);
709  for (int i = 0; i < NRoles; ++i) {
710  const QList<QAbstractButton *> &list = d->buttonLists[i];
711  for (int j = 0; j < list.count(); ++j) {
712  if (list.at(j) == button)
713  return ButtonRole(i);
714  }
715  }
716  return InvalidRole;
717 }
718 
725 {
726  Q_D(QDialogButtonBox);
727 
728  if (!button)
729  return;
730 
731  // Remove it from the standard button hash first and then from the roles
732  d->standardButtonHash.remove(reinterpret_cast<QPushButton *>(button));
733  for (int i = 0; i < NRoles; ++i) {
734  QList<QAbstractButton *> &list = d->buttonLists[i];
735  for (int j = 0; j < list.count(); ++j) {
736  if (list.at(j) == button) {
737  list.takeAt(j);
738  if (!d->internalRemove) {
739  disconnect(button, SIGNAL(clicked()), this, SLOT(_q_handleButtonClicked()));
740  disconnect(button, SIGNAL(destroyed()), this, SLOT(_q_handleButtonDestroyed()));
741  }
742  break;
743  }
744  }
745  }
746  if (!d->internalRemove)
747  button->setParent(nullptr);
748 }
749 
762 {
763  Q_D(QDialogButtonBox);
764  if (Q_UNLIKELY(role <= InvalidRole || role >= NRoles)) {
765  qWarning("QDialogButtonBox::addButton: Invalid ButtonRole, button not added");
766  return;
767  }
769  button->setParent(this);
770  d->addButton(button, role);
771 }
772 
781 {
782  Q_D(QDialogButtonBox);
783  if (Q_UNLIKELY(role <= InvalidRole || role >= NRoles)) {
784  qWarning("QDialogButtonBox::addButton: Invalid ButtonRole, button not added");
785  return nullptr;
786  }
787  QPushButton *button = new QPushButton(text, this);
788  d->addButton(button, role);
789  return button;
790 }
791 
800 {
801  Q_D(QDialogButtonBox);
802  return d->createButton(button);
803 }
804 
813 void QDialogButtonBox::setStandardButtons(StandardButtons buttons)
814 {
815  Q_D(QDialogButtonBox);
816  // Clear out all the old standard buttons, then recreate them.
817  qDeleteAll(d->standardButtonHash.keys());
818  d->standardButtonHash.clear();
819 
820  d->createStandardButtons(buttons);
821 }
822 
823 QDialogButtonBox::StandardButtons QDialogButtonBox::standardButtons() const
824 {
825  Q_D(const QDialogButtonBox);
826  StandardButtons standardButtons = NoButton;
827  QHash<QPushButton *, StandardButton>::const_iterator it = d->standardButtonHash.constBegin();
828  while (it != d->standardButtonHash.constEnd()) {
829  standardButtons |= it.value();
830  ++it;
831  }
832  return standardButtons;
833 }
834 
842 {
843  Q_D(const QDialogButtonBox);
844  return d->standardButtonHash.key(which);
845 }
846 
854 {
855  Q_D(const QDialogButtonBox);
856  return d->standardButtonHash.value(static_cast<QPushButton *>(button));
857 }
858 
860 {
861  Q_Q(QDialogButtonBox);
862  if (QAbstractButton *button = qobject_cast<QAbstractButton *>(q->sender())) {
863  // Can't fetch this *after* emitting clicked, as clicked may destroy the button
864  // or change its role. Now changing the role is not possible yet, but arguably
865  // both clicked and accepted/rejected/etc. should be emitted "atomically"
866  // depending on whatever role the button had at the time of the click.
867  const QDialogButtonBox::ButtonRole buttonRole = q->buttonRole(button);
869 
870  emit q->clicked(button);
871 
872  if (!guard)
873  return;
874 
875  switch (QPlatformDialogHelper::ButtonRole(buttonRole)) {
878  emit q->accepted();
879  break;
882  emit q->rejected();
883  break;
885  emit q->helpRequested();
886  break;
887  default:
888  break;
889  }
890  }
891 }
892 
894 {
895  Q_Q(QDialogButtonBox);
896  if (QObject *object = q->sender()) {
898  q->removeButton(reinterpret_cast<QAbstractButton *>(object));
899  }
900 }
901 
914 {
915  Q_D(QDialogButtonBox);
916  if (d->center != center) {
917  d->center = center;
918  d->resetLayout();
919  }
920 }
921 
923 {
924  Q_D(const QDialogButtonBox);
925  return d->center;
926 }
927 
932 {
934 
935  Q_D(QDialogButtonBox);
936  switch (event->type()) {
937  case QEvent::StyleChange: // Propagate style
938  if (!d->standardButtonHash.empty()) {
939  QStyle *newStyle = style();
940  const StandardButtonHash::iterator end = d->standardButtonHash.end();
941  for (StandardButtonHash::iterator it = d->standardButtonHash.begin(); it != end; ++it)
942  it.key()->setStyle(newStyle);
943  }
944 #ifdef Q_OS_MAC
945  Q_FALLTHROUGH();
947 #endif
948  d->resetLayout();
950  break;
951  default:
953  break;
954  }
955 }
956 
961 {
962  Q_D(QDialogButtonBox);
963  if (event->type() == QEvent::Show) {
964  QList<QAbstractButton *> acceptRoleList = d->buttonLists[AcceptRole];
965  QPushButton *firstAcceptButton = acceptRoleList.isEmpty() ? 0 : qobject_cast<QPushButton *>(acceptRoleList.at(0));
966  bool hasDefault = false;
967  QWidget *dialog = nullptr;
968  QWidget *p = this;
969  while (p && !p->isWindow()) {
970  p = p->parentWidget();
971  if ((dialog = qobject_cast<QDialog *>(p)))
972  break;
973  }
974 
975  const auto pbs = (dialog ? dialog : this)->findChildren<QPushButton *>();
976  for (QPushButton *pb : pbs) {
977  if (pb->isDefault() && pb != firstAcceptButton) {
978  hasDefault = true;
979  break;
980  }
981  }
982  if (!hasDefault && firstAcceptButton)
983  firstAcceptButton->setDefault(true);
984  }else if (event->type() == QEvent::LanguageChange) {
985  d->retranslateStrings();
986  }
987  return QWidget::event(event);
988 }
989 
991 
992 #include "moc_qdialogbuttonbox.cpp"
small capitals from c petite p scientific i
[1]
Definition: afcover.h:80
Arabic default style
Definition: afstyles.h:94
The QAbstractButton class is the abstract base class of button widgets, providing functionality commo...
void setShortcut(const QKeySequence &key)
void setIcon(const QIcon &icon)
static QStyle * style()
The QBoxLayout class lines up child widgets horizontally or vertically.
Definition: qboxlayout.h:57
int count() const override
Definition: qboxlayout.cpp:707
void addWidget(QWidget *, int stretch=0, Qt::Alignment alignment=Qt::Alignment())
QLayoutItem * takeAt(int) override
Definition: qboxlayout.cpp:725
void addSpacing(int size)
Definition: qboxlayout.cpp:997
void addStretch(int stretch=0)
QLayoutItem * itemAt(int) const override
Definition: qboxlayout.cpp:716
The QDialogButtonBox class is a widget that presents buttons in a layout that is appropriate to the c...
void clicked(QAbstractButton *button)
bool centerButtons
whether the buttons in the button box are centered
void changeEvent(QEvent *event) override
ButtonRole buttonRole(QAbstractButton *button) const
void addButton(QAbstractButton *button, ButtonRole role)
void setStandardButtons(StandardButtons buttons)
QPushButton * button(StandardButton which) const
StandardButton standardButton(QAbstractButton *button) const
Qt::Orientation orientation
the orientation of the button box
QDialogButtonBox(QWidget *parent=nullptr)
void setOrientation(Qt::Orientation orientation)
void setCenterButtons(bool center)
QList< QAbstractButton * > buttons() const
StandardButtons standardButtons
collection of standard buttons in the button box
void removeButton(QAbstractButton *button)
bool event(QEvent *event) override
QPushButton * createButton(QDialogButtonBox::StandardButton button, bool doLayout=true)
QList< QAbstractButton * > buttonLists[QDialogButtonBox::NRoles]
void addButton(QAbstractButton *button, QDialogButtonBox::ButtonRole role, bool doLayout=true)
void createStandardButtons(QDialogButtonBox::StandardButtons buttons)
QDialogButtonBoxPrivate(Qt::Orientation orient)
QHash< QPushButton *, QDialogButtonBox::StandardButton > standardButtonHash
QDialogButtonBox::ButtonLayout layoutPolicy
void addButtonsToLayout(const QList< QAbstractButton * > &buttonList, bool reverse)
The QEvent class is the base class of all event classes. Event objects contain event parameters.
Definition: qcoreevent.h:58
@ StyleChange
Definition: qcoreevent.h:149
@ Show
Definition: qcoreevent.h:89
@ LanguageChange
Definition: qcoreevent.h:136
@ MacSizeChange
Definition: qcoreevent.h:230
static QPlatformTheme * platformTheme()
The QHBoxLayout class lines up widgets horizontally.
Definition: qboxlayout.h:114
The QHash::const_iterator class provides an STL-style const iterator for QHash.
Definition: qhash.h:1088
iterator begin()
Definition: qhash.h:1155
iterator end() noexcept
Definition: qhash.h:1159
iterator insert(const Key &key, const T &value)
Definition: qhash.h:1228
The QKeySequence class encapsulates a key sequence as used by shortcuts.
Definition: qkeysequence.h:71
bool isEmpty() const
void setContentsMargins(int left, int top, int right, int bottom)
Definition: qlayout.cpp:325
The QLayoutItem class provides an abstract item that a QLayout manipulates.
Definition: qlayoutitem.h:61
qsizetype size() const noexcept
Definition: qlist.h:414
bool isEmpty() const noexcept
Definition: qlist.h:418
const_reference at(qsizetype i) const noexcept
Definition: qlist.h:457
qsizetype count() const noexcept
Definition: qlist.h:415
QList< T > mid(qsizetype pos, qsizetype len=-1) const
Definition: qlist.h:979
T & first()
Definition: qlist.h:643
void append(parameter_type t)
Definition: qlist.h:469
The QObject class is the base class of all Qt objects.
Definition: qobject.h:125
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Definition: qobject.cpp:2772
QObject * sender() const
Definition: qobject.cpp:2472
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Definition: qobject.cpp:3048
void destroyed(QObject *=nullptr)
static const int * buttonLayout(Qt::Orientation orientation=Qt::Horizontal, ButtonLayout policy=UnknownLayout)
static ButtonRole buttonRole(StandardButton button)
virtual QString standardButtonText(int button) const
The QPointer class is a template class that provides guarded pointers to QObject.
Definition: qpointer.h:54
The QPushButton widget provides a command button.
Definition: qpushbutton.h:56
void setDefault(bool)
bool isDefault() const
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
Definition: qsizepolicy.h:54
The QString class provides a Unicode character string.
Definition: qstring.h:388
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
Definition: qstyle.h:65
@ SH_DialogButtonBox_ButtonsHaveIcons
Definition: qstyle.h:690
@ SH_DialogButtonLayout
Definition: qstyle.h:687
StandardPixmap
Definition: qstyle.h:750
@ SP_DialogDiscardButton
Definition: qstyle.h:798
@ SP_DialogRetryButton
Definition: qstyle.h:826
@ SP_DialogNoButton
Definition: qstyle.h:800
@ SP_RestoreDefaultsButton
Definition: qstyle.h:828
@ SP_DialogCloseButton
Definition: qstyle.h:795
@ SP_DialogOpenButton
Definition: qstyle.h:793
@ SP_DialogSaveAllButton
Definition: qstyle.h:824
@ SP_DialogCancelButton
Definition: qstyle.h:791
@ SP_DialogIgnoreButton
Definition: qstyle.h:827
@ SP_DialogHelpButton
Definition: qstyle.h:792
@ SP_DialogSaveButton
Definition: qstyle.h:794
@ SP_DialogNoToAllButton
Definition: qstyle.h:823
@ SP_DialogResetButton
Definition: qstyle.h:797
@ SP_DialogOkButton
Definition: qstyle.h:790
@ SP_DialogAbortButton
Definition: qstyle.h:825
@ SP_DialogYesButton
Definition: qstyle.h:799
@ SP_DialogApplyButton
Definition: qstyle.h:796
@ SP_DialogYesToAllButton
Definition: qstyle.h:822
@ SE_PushButtonLayoutItem
Definition: qstyle.h:330
The QVBoxLayout class lines up widgets vertically.
Definition: qboxlayout.h:127
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:133
void setParent(QWidget *parent)
Definition: qwidget.cpp:10512
void setStyle(QStyle *)
Definition: qwidget.cpp:2642
static void setTabOrder(QWidget *, QWidget *)
Definition: qwidget.cpp:6930
void setFocusProxy(QWidget *)
Definition: qwidget.cpp:6382
void hide()
Definition: qwidget.cpp:8078
void show()
Definition: qwidget.cpp:7825
virtual void changeEvent(QEvent *)
Definition: qwidget.cpp:9283
bool event(QEvent *event) override
Definition: qwidget.cpp:8772
QStyle * style() const
Definition: qwidget.cpp:2612
QWidget * parentWidget() const
Definition: qwidget.h:937
void setLayoutItemMargins(int left, int top, int right, int bottom)
Definition: qwidget.cpp:12120
void getLayoutItemMargins(int *left, int *top, int *right, int *bottom) const
Definition: qwidget.cpp:12108
QPushButton
[1]
float step
QOpenGLWidget * widget
[1]
QString text
[meta data]
QPushButton * button
[2]
qDeleteAll(list.begin(), list.end())
typename C::iterator iterator
Definition: qnamespace.h:55
@ WA_WState_OwnSizePolicy
Definition: qnamespace.h:359
Orientation
Definition: qnamespace.h:123
@ Horizontal
Definition: qnamespace.h:124
@ Vertical
Definition: qnamespace.h:125
QTextStream & center(QTextStream &stream)
#define Q_FALLTHROUGH()
#define Q_UNLIKELY(x)
unsigned int uint
Definition: qglobal.h:334
@ text
#define qWarning
Definition: qlogging.h:179
#define SLOT(a)
Definition: qobjectdefs.h:87
#define SIGNAL(a)
Definition: qobjectdefs.h:88
GLuint GLuint end
GLdouble GLdouble GLdouble GLdouble top
GLdouble GLdouble right
GLint left
GLint GLint bottom
GLuint start
struct _cl_event * event
Definition: qopenglext.h:2998
GLdouble GLdouble GLdouble GLdouble q
Definition: qopenglext.h:259
GLfloat GLfloat p
[1]
Definition: qopenglext.h:12698
#define sp
#define emit
Definition: qtmetamacros.h:85
QIcon icon
[15]
QObject::connect nullptr
QFileDialog dialog(this)
[1]
QGraphicsItem * item
QStringList::Iterator it
QStringList list
[0]
QCommandLinkButton * pb
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent