Results 1 to 2 of 2

Thread: Qgraphics View

  1. #1

    Default Qgraphics View

    I am creating Qgraphics view in MDI child
    but I have an error
    here is my code
    void MainWindow::newFile()
    { static int sequenceNumber = 1;
    isUntitled = true;
    curFile = tr("document%1.txt").arg(sequenceNumber++);
    QW->setWindowTitle(curFile);
    QW->show();

    MdiChild *Mdi=new MdiChild();
    Mdi->show();

    view = new QGraphicsView(Mdi->scene,MainWindow);
    view->setGeometry(QRect(100, 160, 221, 121));
    view->setDragMode(view->NoDrag);
    view ->show();
    }
    The error is Expected primary epression before '>' token
    please help me

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qgraphics View

    Please don't start multiple threads on the same subject.

Similar Threads

  1. Not Scaling QBrush style fro qgraphics view item
    By dan in forum Qt Programming
    Replies: 8
    Last Post: 20th September 2013, 21:56
  2. Creating Qgraphics View code
    By amagdy.ibrahim in forum Qt Programming
    Replies: 9
    Last Post: 15th June 2008, 16:43
  3. Replies: 2
    Last Post: 22nd July 2007, 20:21
  4. QGraphics view problem
    By kiranraj in forum Qt Programming
    Replies: 5
    Last Post: 6th March 2007, 22:28
  5. Model, View and Proxy
    By No-Nonsense in forum Qt Programming
    Replies: 2
    Last Post: 21st November 2006, 09:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.