Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How can QMainWindow fill device window whole
Forum Updated to NodeBB v4.3 + New Features

How can QMainWindow fill device window whole

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 907 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.
  • H Offline
    H Offline
    houmingc
    wrote on last edited by
    #1

    Bought a LCD module, below is the specification, it is plug into a imx6 controller
    Display Area: 697.7 x 129.7
    Resolution: 1366 x 254
    Aspect Ratio: 16 x 3

    Qt Application runs ok on PC, but onboard it did not fill the device screen
    In Qt Property, below is the settings

    WindowModelity - WindowModal
    geometry - 1366 x 254
    Width: 1366
    Height: 254

    1 Reply Last reply
    0
    • Pradeep P NP Offline
      Pradeep P NP Offline
      Pradeep P N
      wrote on last edited by
      #2

      Hi,

      You can try this QWindow::setMaximumSize(const QSize & size) and set the size or you can even try with window.setWindowState(Qt::WindowMaximized)

      Pradeep Nimbalkar.
      Upvote the answer(s) that helped you to solve the issue...
      Keep code clean.

      1 Reply Last reply
      2
      • H Offline
        H Offline
        houmingc
        wrote on last edited by
        #3

        I need to set the size of the QWidget to fit the device screen which is Resolution: 1366 x 254, not full screen.

        what is the qt command i should use

        1 Reply Last reply
        0
        • Pradeep P NP Offline
          Pradeep P NP Offline
          Pradeep P N
          wrote on last edited by
          #4

          You can use setMaximumSize(width, height) or setMinimumSize(width, height)

          Pradeep Nimbalkar.
          Upvote the answer(s) that helped you to solve the issue...
          Keep code clean.

          1 Reply Last reply
          2

          • Login

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