×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    5

    Borders around Qt Symbian application

    Hello,

    I've used Qt creator to make an application for symbian devices and tried to find a solution to the following problem many times over a period of months, but without success. The problem appears in the use of both Qt simulator and Symbian devices.

    The problem is as follows: When the application should work as fullscreen it leaves an about 3 px border around the screen. In the simulator this border is dark, but in the device the color varies depending on what theme (or wallpaper) is in use. I have written a simple code where this problem occurs:

    Code:
    #include <QtGui>
    #include <QtCore/qstate.h>
    
    int main(int argc, char *argv[]) {
    
       QApplication app(argc, argv);
    
       QGraphicsScene* scene = new QGraphicsScene();
       QGraphicsView view(scene);
    
       view.setBackgroundBrush(QBrush(QColor(200,30,30,255)));
       view.showFullScreen();
    
       return app.exec();
    
    }
    I can't seem to find any answers regarding this problem. My example project consists of only two files, main.cpp and .pro file that contains only these two lines:

    Code:
    SOURCES += \
       main.cpp
    Any help is much appreciated.

  2. #2
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Borders around Qt Symbian application

    I've never seen this behavior, but then I don't use any of the QGraphics stuff.

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    5

    Re: Borders around Qt Symbian application

    Furthermore the problem occurs also in the Qt Creators own example "Animated Tiles" if you change the view->show() to view->showFullScreen(). So the whole fullscreen mechanism doesn't seem to work properly in the QGraphicsView-library. I've tested this on simulator, Nokia 5800 and N8.

  4. #4
    Registered User
    Join Date
    Jul 2009
    Posts
    46

    Re: Borders around Qt Symbian application

    you may need to check if there is any border/margin introduced by QGraphicsView parent classes QAbstractScrollArea and QFrame. Look at scrollbar status and current frame shape (http://doc.qt.nokia.com/4.6/qframe.html#Shape-enum)

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    5

    Re: Borders around Qt Symbian application

    Quote Originally Posted by daudrain View Post
    you may need to check if there is any border/margin introduced by QGraphicsView parent classes QAbstractScrollArea and QFrame. Look at scrollbar status and current frame shape (http://doc.qt.nokia.com/4.6/qframe.html#Shape-enum)
    Right on! That was it. Thank you so much =)

  6. #6
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    91

    Re: Borders around Qt Symbian application

    how you remove it?

  7. #7
    Registered User
    Join Date
    Oct 2010
    Posts
    5

    Re: Borders around Qt Symbian application

    Quote Originally Posted by metRo_ View Post
    how you remove it?
    I simply added "view.setFrameShape(QFrame::NoFrame);".

Similar Threads

  1. Web application on qt for symbian
    By KimWonChol in forum [Archived] Qt General ( Qt技术)
    Replies: 0
    Last Post: 2010-01-21, 14:34

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×