Results 1 to 5 of 5

Thread: CHIP Demo

  1. #1
    Join Date
    Mar 2011
    Posts
    82
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default CHIP Demo

    Hello,

    I'm trying to follow the chip demo as a guideline on how to work with the Graphics Scene / View.

    My problem now is that I can't seem to embed the view into a dlg window. That is, I CAN instantiate the view object, I CAN instantiate the SCENE object and I'm trying to follow most of the CHIP demo on most of the code. But I just can't make it show in my dialog window.

    If I use the view->show(); line it appears as A NEW WINDOW (which kinda makes sense), but I just can't seem to figure how how to make it be embebed INTO the dialog.

    Also, I seem to have a problem with either the scene, the view or both being of a massive size, and I don't know how to resize them.

    I'm attaching a screenshot of how it looks, so you know why it's wrong.
    Attached Images Attached Images

  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: CHIP Demo

    Insert the view into the dialog's layout or pass a pointer to the dialog as a parent to the view's constructor.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    alitoh (7th April 2011)

  4. #3
    Join Date
    Mar 2011
    Posts
    82
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: CHIP Demo

    Man, you are a damn god. Hope you know that.

    "Insert the view into the dialog's layout" I did this by downright copying the demo, but I don't really understand the procedure, care to explain or direct me to the proper documentation?

    Thanks!

  5. #4
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: CHIP Demo

    Read here
    Also this example is useful.

    And then,if you don't understand a specific thing, ask and we will try to explain it
    //also CHIP Demo should have comments that explain how it works

  6. #5
    Join Date
    Mar 2011
    Posts
    82
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: CHIP Demo

    Quote Originally Posted by Zlatomir View Post
    //also CHIP Demo should have comments that explain how it works
    I don't know it that's more of a general comment or pointed out at me. But the CHIP files I downloaded are not commented... at all.

    It should be heavily commented in my opinion. Specially considering it is one of the most powerful and appealing demos QT has right now.

Similar Threads

  1. Game demo
    By QTInfinity in forum Qt-based Software
    Replies: 0
    Last Post: 1st November 2010, 04:56
  2. Customization of Qt Demo
    By nivditha in forum Newbie
    Replies: 7
    Last Post: 26th October 2010, 22:58
  3. DvB Chip sets
    By yuvaraj.yadav in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 29th January 2010, 05:16
  4. Query in 40000 chip demo
    By aamer4yu in forum Qt Programming
    Replies: 11
    Last Post: 19th October 2006, 01:01

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.