Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Second window overlaps maximum screen size on actual device.
Forum Updated to NodeBB v4.3 + New Features

Second window overlaps maximum screen size on actual device.

Scheduled Pinned Locked Moved Mobile and Embedded
8 Posts 3 Posters 3.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    loell
    wrote on last edited by
    #1

    Hi,

    when i try to launch another main window or any other widget container for that matter, it overlaps from the maximum screen height and width on the actual device.

    on the emulator however it works fine. any ideas?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AS.Sri
      wrote on last edited by
      #2

      Example code and Screen Shot will be helpful.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        loell
        wrote on last edited by
        #3

        just a typical launching of another window?
        @

        void MainWindow::on_toolButton_clicked()

        {
        MainWindow2 *mw2;

        mw2 = new MainWindow2;
        
        
        this->hide();
        mw2->show();
        

        }

        @

        once the tool button is pressed, it will show this with normal size boundaries and no overlapping

        !http://img713.imageshack.us/img713/8622/27516056.png(n95 simulator)!

        but on actual device, the button "hide" is way over below and you can't see it anymore and the text area almost occupies the whole screen.

        is this common? i'm using qt 4.6 on s60 third edition FP1.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          AS.Sri
          wrote on last edited by
          #4

          How are you placing the text field and the button in the mainwindow2? Are you placing them in a layout? Are you setting any geometry for the window?

          From my experience the UI on the Qt Simulator is NOT the exact look you get on the device.

          1 Reply Last reply
          0
          • L Offline
            L Offline
            loell
            wrote on last edited by
            #5

            yeah, i'm placing it on a vertical layout, and is set to 800 x 480 same as the first window, should I dynamically set the geometry? rather relying on the designer setting?

            1 Reply Last reply
            0
            • A Offline
              A Offline
              AS.Sri
              wrote on last edited by
              #6

              If i am not wrong the resolution of a 3rd edition phone is 320 x 240 pixels. Try not to hardcode the values. You can get the screen size by using this: @QDesktopWidget *desktop = QApplication::desktop();
              QRect screenSize = desktop->screenGeometry();@

              You can set the geometry of your main widget to fit the device screen size then you should not be facing the stretched widgets problem.

              Try setting the max width and height of the text filed if required.

              PS: QApplication::desktop()->availableGeometry() gives wrong geometry "Available Geometry Bug on Symbian":http://bugreports.qt.nokia.com/browse/QTBUG-14058

              1 Reply Last reply
              0
              • S Offline
                S Offline
                suhailmohdmalik
                wrote on last edited by
                #7

                Well i think that setting the geometry is needed for displaying the second window Ui properly, mostly i have observed that ui where geometry is set for a layout does not view properly so better to take this layout which you are using on a widget and then set geometry for that widget.
                May be you wont be able to reproduce it on simulator but on device it should work.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  loell
                  wrote on last edited by
                  #8

                  just an update, it seems that it's a Qt 4.6 symbian bug? and that to go around with it, is to use mainwindow.showMaximized() rather than just mainwindow.show()

                  still, getting the screen size and then setting the geometry should have it's uses should i run into resizing problems in the future. thanks!

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved