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. QGraphicsView hidden constructors
Forum Updated to NodeBB v4.3 + New Features

QGraphicsView hidden constructors

Scheduled Pinned Locked Moved Solved General and Desktop
qgraphicsviewconstructor
3 Posts 2 Posters 1.5k Views 2 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.
  • A Offline
    A Offline
    alogim
    wrote on 25 Jan 2016, 14:14 last edited by alogim
    #1

    I created a new class inheriting from QGraphicsView and since I have to provide the same superclass constructors, I noticed on the docs that there are two of them

    • QGraphicsView::QGraphicsView(QWidget * parent = 0) and
    • QGraphicsView::QGraphicsView(QGraphicsScene * scene, QWidget * parent = 0)

    However, inside QtCreator, two additionals constructors/functions are shown:

    • QGraphicsView::QGraphicsView(QGraphicsViewPrivate &, QWidget * parent = 0) and
    • QGraphicsView::QGraphicsView(const QGraphicsView &)

    I can't find any indication about these two methods anywhere. I can't even find anything explaining what a QGraphicsViewPrivate is.

    Are there some kind of private members?
    I am using extra/qt5-base 5.5.1-9 (qt qt5) with extra/qtcreator 3.6.0-1 on Archlinux with kernel 4.3.3-3-ARCH.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on 25 Jan 2016, 14:22 last edited by
      #2

      Hi!

      • QGraphicsView::QGraphicsView(const QGraphicsView &) is just an ordinary copy constructor. You are not allowed to access it due to the design of QObject, see: No Copy Constructor or Assignment Operator.
      • QGraphicsViewPrivate is not part of the public API and thus you shouldn't use it. If you really wanted to you it you would have to include the corresponding private headers.
      A 1 Reply Last reply 25 Jan 2016, 14:25
      1
      • ? A Former User
        25 Jan 2016, 14:22

        Hi!

        • QGraphicsView::QGraphicsView(const QGraphicsView &) is just an ordinary copy constructor. You are not allowed to access it due to the design of QObject, see: No Copy Constructor or Assignment Operator.
        • QGraphicsViewPrivate is not part of the public API and thus you shouldn't use it. If you really wanted to you it you would have to include the corresponding private headers.
        A Offline
        A Offline
        alogim
        wrote on 25 Jan 2016, 14:25 last edited by
        #3

        @Wieland Thank you, I guessed the first was some kind of copy constructor.
        As concerns the second, it was just a curiosity of mine. Thank you :)

        1 Reply Last reply
        0

        1/3

        25 Jan 2016, 14:14

        • Login

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