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. Why cannot set screenGeometry on imx8 wayland backend
Forum Updated to NodeBB v4.3 + New Features

Why cannot set screenGeometry on imx8 wayland backend

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 318 Views
  • 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.
  • A Offline
    A Offline
    Aplix
    wrote on 25 Nov 2021, 01:14 last edited by
    #1

    code:
    widget1::widget1(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::widget1)
    {
    ui->setupUi(this);
    m_desktopWidget = QApplication::desktop();
    QRect rect = m_desktopWidget->screenGeometry(1);
    this->setGeometry(0,0,800,480);
    }

    I can not set the screen by screenGeometry .
    I cant not set coordinate system by setGeometry.
    How to fix it on wayland? It is works fine on X11

    J 1 Reply Last reply 25 Nov 2021, 05:28
    0
    • A Aplix
      25 Nov 2021, 01:14

      code:
      widget1::widget1(QWidget *parent) :
      QWidget(parent),
      ui(new Ui::widget1)
      {
      ui->setupUi(this);
      m_desktopWidget = QApplication::desktop();
      QRect rect = m_desktopWidget->screenGeometry(1);
      this->setGeometry(0,0,800,480);
      }

      I can not set the screen by screenGeometry .
      I cant not set coordinate system by setGeometry.
      How to fix it on wayland? It is works fine on X11

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 25 Nov 2021, 05:28 last edited by
      #2

      @Aplix said in Why cannot set screenGeometry on imx8 wayland backend:

      I can not set the screen by screenGeometry .

      You are not setting the geometry based on screen geometry at all! You set it fixed to 0,0,800,480.
      Should be:

      QRect rect = m_desktopWidget->screenGeometry(1);
      this->setGeometry(rect);
      

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      1/2

      25 Nov 2021, 01:14

      • Login

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