title: Why can't I compare a QTabWIdget::TabPosition with myTabWidget->tabPosition?
body: <p>I am making a custom tab bar, which sits in a custom tab widget. I wish to take certain actions depending on the QTabPosition. Therefore I have the following code:</p>
  
  <pre><code>// get the parent tab widget
  QTabWidget* pTabWidget = dynamic_cast&lt;QTabWidget*&gt;(parent());
  
  QTabWidget::TabPosition tabpos = pTabWidget-&gt;tabPosition;
  </code></pre>
  
  <p>However, this results in the compiler error:</p>
  
  <pre><code>src/m-editor/octave-editor-tabbar.cc: In member function 'virtual void octave_editor_tabbar::paintEvent(QPaintEvent*)':
  src/m-editor/octave-editor-tabbar.cc:69:50: error: cannot convert 'QTabWidget::tabPosition' from type 'QTabWidget::TabPosition (QTabWidget::)()const' to type 'QTabWidget::TabPosition'
   QTabWidget::TabPosition tabpos = pTabWidget-&gt;tabPosition;
                                                ^
  </code></pre>
  
  <p>The parent widget is the custom widget which is derived from QTabWidget.</p>
  
  <p>What is the problem here?</p>