Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Concentric circles example
Qt 6.12 LTS is out! See what's new in the release blog

Concentric circles example

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.3k Views 1 Watching
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on 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
    • ? Offline
      ? Offline
      A Former User
      wrote on 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

      • Login

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