Results 1 to 4 of 4

Thread: Display Problem

  1. #1
    Join Date
    Mar 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Question Display Problem

    Hi All,

    I have developed a QT GUI which uses IGSTK ,ITK AND VTK classes functionality.
    Qt Code:
    1. //ScribbleArea.h is as shown below
    2.  
    3. class ScribbleArea : public igstk::QTWidget
    4. {
    5. Q_OBJECT
    6.  
    7. public:
    8. ScribbleArea(QWidget *parent = 0,Qt::WFlags flags = 0);
    9.  
    10.  
    11. protected:
    12. void paintEvent(QPaintEvent *event);
    13.  
    14.  
    15. };
    16. //part of ScribbleArea.cpp is as shown below
    17. ScribbleArea::ScribbleArea(QWidget *parent,Qt::WFlags flags):igstk::QTWidget(parent,flags)
    18. {
    19. setAttribute(Qt::WA_StaticContents);
    20.  
    21. }
    22. void ScribbleArea::paintEvent(QPaintEvent *event)
    23. {
    24. QPainter painter(this);
    25. painter.setRenderHint(QPainter::Antialiasing, true);
    26. painter.setPen(QPen(Qt::red, 12, Qt::DashDotLine, Qt::RoundCap));
    27. painter.setBrush(QBrush(Qt::green, Qt::SolidPattern));
    28. painter.drawEllipse(80, 80, 200, 200);
    29. }
    30. //In the constructor of the QMainWindow derived class (i.e in QFIRST.CPP)i have the below code:
    31.  
    32. ScribbleArea* AxialWidget;
    33. m_AxialWidget = new ScribbleArea(ui.groupBox_4);
    34.  
    35. typedef igstk::View2D View2DType;
    36. View2DType::Pointer m_view2DAxial;
    37.  
    38. m_AxialWidget->RequestSetView(m_view2DAxial);
    To copy to clipboard, switch view to plain text mode 
    The problem is that i am not able to see the ellipse inside the m_AxialWidget when i run the application.
    Please help me in this.

    thanks,
    ashwath

  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: Display Problem

    What does RequestSetView() do?
    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. #3
    Join Date
    Mar 2011
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Display Problem

    The RequestSetView attaches the igstk:2DView to the igstk::QTWidget and helps is displaying 2D images on the igstk::QTWidget.

  4. #4
    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: Display Problem

    Quote Originally Posted by Ashwath View Post
    The RequestSetView attaches the igstk:2DView to the igstk::QTWidget and helps is displaying 2D images on the igstk::QTWidget.
    Yeah, that was really helpful So what does it really do?
    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.


Similar Threads

  1. QWT on ARM9 - Display problem
    By midiwidi in forum Qwt
    Replies: 3
    Last Post: 24th November 2010, 09:41
  2. Display Problem
    By yuvaraj.yadav in forum Newbie
    Replies: 1
    Last Post: 4th May 2009, 13:00
  3. Display Problem
    By yuvaraj.yadav in forum Qt Programming
    Replies: 21
    Last Post: 3rd May 2009, 14:32
  4. The problem with the display of QListWidget
    By whyisosad in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2008, 19:41
  5. Model display problem
    By gyre in forum Newbie
    Replies: 3
    Last Post: 31st December 2007, 13:46

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.