I was trying to set the position of my program's window and had to use a QPoint object. It's working now, but I'm a little confused on something. I first tried to create the object like this:
Qt Code:
  1. QPoint windowPos = new QPoint(0, 0);
To copy to clipboard, switch view to plain text mode 

But that gave the error:
error: conversion from `QPoint*' to non-scalar type `QPoint' requested
I was able to get it to work with this line of code:
Qt Code:
  1. QPoint windowPos(0, 0);
To copy to clipboard, switch view to plain text mode 

But I don't understand why the first line didn't work. I thought that was the correct method for creating an object in C++?

I would appreciate someone explaining how my thinking is wrong, thanks