title: QSpinbox in QWizardPage gets initial focus even if its focus-policy is set to NoFocus
body: <p>I create a QSpinBox in a QWizardPage. It get focus at the start of the wizardpage even when I set the focusPolicy to Qt.Nofocus.</p>
  <p>What I set in Qt creator is:</p>
  <p><a href="https://i.stack.imgur.com/YCOgT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YCOgT.png" alt="enter image description here" /></a></p>
  <p>But When the wizardpage start, I got:</p>
  <p><a href="https://i.stack.imgur.com/7MMgs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7MMgs.png" alt="enter image description here" /></a></p>
  <p>Then, if I press <code>Tab</code> for several times, the focus will move between <code>Finish</code> and <code>Cancel</code> as expected.</p>
  <p>I am using PyQt 5.15.6 on Windows 10. My python codes consists of a WizardPage.py file generated by pyuic5 and a test_wizard.py file.</p>
  <p>WizardPage.py file :</p>
  <pre><code># -*- coding: utf-8 -*-
  
  # Form implementation generated from reading ui file 'wizardpage.ui'
  #
  # Created by: PyQt5 UI code generator 5.15.6
  #
  # WARNING: Any manual changes made to this file will be lost when pyuic5 is
  # run again.  Do not edit this file unless you know what you are doing.
  
  
  from PyQt5 import QtCore, QtGui, QtWidgets
  
  
  class Ui_WizardPage(object):
      def setupUi(self, WizardPage):
          WizardPage.setObjectName(&quot;WizardPage&quot;)
          WizardPage.resize(400, 300)
          self.spinBox = QtWidgets.QSpinBox(WizardPage)
          self.spinBox.setGeometry(QtCore.QRect(40, 50, 42, 22))
          self.spinBox.setFocusPolicy(QtCore.Qt.NoFocus)
          self.spinBox.setObjectName(&quot;spinBox&quot;)
  
          self.retranslateUi(WizardPage)
          QtCore.QMetaObject.connectSlotsByName(WizardPage)
  
      def retranslateUi(self, WizardPage):
          _translate = QtCore.QCoreApplication.translate
          WizardPage.setWindowTitle(_translate(&quot;WizardPage&quot;, &quot;WizardPage&quot;))
  </code></pre>
  <p>test_wizard.py file:</p>
  <pre><code>from PyQt5 import QtCore, QtGui, QtWidgets
  from WizardPage import *
  from PyQt5.Qt import *
  from PyQt5.QtCore import *
  import sys
  
  
  class test_wizard_page(QtWidgets.QWizardPage, Ui_WizardPage):
      def __init__(self, parent):
          super().__init__(parent)
          self.setupUi(self)
  
  
  class MyWizard(QtWidgets.QWizard):
      def __init__(self):
          super().__init__()
  
          self.test_wizard_page = test_wizard_page(self)
          # self.test_wizard_page.setE
          self.addPage(self.test_wizard_page)
  
  
  if __name__ == &quot;__main__&quot;:
      app = QApplication(sys.argv)
      wizard = MyWizard()
      wizard.show()
      sys.exit(app.exec_())
  </code></pre>
  <p>And .ui file I create using the Qt Creator:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;ui version=&quot;4.0&quot;&gt;
   &lt;class&gt;WizardPage&lt;/class&gt;
   &lt;widget class=&quot;QWizardPage&quot; name=&quot;WizardPage&quot;&gt;
    &lt;property name=&quot;geometry&quot;&gt;
     &lt;rect&gt;
      &lt;x&gt;0&lt;/x&gt;
      &lt;y&gt;0&lt;/y&gt;
      &lt;width&gt;400&lt;/width&gt;
      &lt;height&gt;300&lt;/height&gt;
     &lt;/rect&gt;
    &lt;/property&gt;
    &lt;property name=&quot;windowTitle&quot;&gt;
     &lt;string&gt;WizardPage&lt;/string&gt;
    &lt;/property&gt;
    &lt;widget class=&quot;QSpinBox&quot; name=&quot;spinBox&quot;&gt;
     &lt;property name=&quot;geometry&quot;&gt;
      &lt;rect&gt;
       &lt;x&gt;40&lt;/x&gt;
       &lt;y&gt;50&lt;/y&gt;
       &lt;width&gt;42&lt;/width&gt;
       &lt;height&gt;22&lt;/height&gt;
      &lt;/rect&gt;
     &lt;/property&gt;
     &lt;property name=&quot;focusPolicy&quot;&gt;
      &lt;enum&gt;Qt::NoFocus&lt;/enum&gt;
     &lt;/property&gt;
    &lt;/widget&gt;
   &lt;/widget&gt;
   &lt;resources/&gt;
   &lt;connections/&gt;
  &lt;/ui&gt;
  </code></pre>
  <p><a href="https://stackoverflow.com/q/56899495/9758790">This question</a> may be related to my question. I also tried to reproduce their problem but fails with PyQt I currently uses. Is my question also a bug of Qt? And how can deal with this?</p>