Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Concentric circles example
QtWS25 Last Chance

Concentric circles example

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jamcguire
    wrote on 28 Dec 2012, 19:16 last edited by
    #1

    Hi there,

    I'm unable to get the concentric circles example found here working: http://qt-project.org/doc/qt-5.0/qtwidgets/painting-concentriccircles.html

    There are a couple of mistakes on this page:

    http://qt-project.org/doc/qt-5.0/qtwidgets/painting-concentriccircles-window-cpp.html

    • On line 3 '#include <QtWidgets>'
    • I do not see the 'circleWidgets' array defined anywhere.

    But the problem is when I attempt to implement the code in a similar fashion, I'm running into this error:

    c:\qt5\qtbase\include\QtWidgets/qwidget.h:720:5: error: 'QWidget::QWidget(const QWidget&)' is private

    Which seems to relate to the constructor in circlewidget.cpp or perhaps its header?

    CircleWidget::CircleWidget(QWidget *parent)
    : QWidget(parent)

    Can anyone offer some advice? Thank you.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jamcguire
      wrote on 28 Dec 2012, 20:10 last edited by
      #2

      As advised on the #qt freenode channel, this is due to the way in which I was declaring circle widgets when calling it from window.cpp, I had missed off the pointer definition (*) when instantiating it.

      CircleWidget* circleWidgets = new CircleWidget

      I then received an error about vtables, so need to work on the Q_OBJECT macro in the header files.

      1 Reply Last reply
      0

      2/2

      28 Dec 2012, 20:10

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved