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. QMainWindow title can't be removed on iOS
Qt 6.11 is out! See what's new in the release blog

QMainWindow title can't be removed on iOS

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 349 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.
  • I Offline
    I Offline
    ivazhu
    wrote on last edited by
    #1
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        QMainWindow w;
    
        w.setWindowFlags(Qt::CustomizeWindowHint);
        w.setStyleSheet("background-color:red;");
    
        QWidget *ce = new QWidget(&w);
        {
            QRect screenGeometry = QGuiApplication::primaryScreen()->geometry();
            int screenHeight = screenGeometry.height();
            int screenWidth = screenGeometry.width();
    
            w.setFixedWidth(screenWidth);
            w.setFixedHeight(screenHeight);
    
            ce->setFixedWidth(screenWidth);
            ce->setFixedHeight(screenHeight);
    
            ce->setStyleSheet("background-color:blue;");
        }
    
    
        w.setCentralWidget(ce);
        w.show();
    
        return a.exec();
    }
    

    The result on iPhone 12pro is:
    ios.jpg

    There is no any red on Desktop (as expected).

    Qt::FramelessWindowHint doesn't work also.

    Does anyone have idea how to deal with it?

    JoeCFDJ 1 Reply Last reply
    0
    • I ivazhu
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          QMainWindow w;
      
          w.setWindowFlags(Qt::CustomizeWindowHint);
          w.setStyleSheet("background-color:red;");
      
          QWidget *ce = new QWidget(&w);
          {
              QRect screenGeometry = QGuiApplication::primaryScreen()->geometry();
              int screenHeight = screenGeometry.height();
              int screenWidth = screenGeometry.width();
      
              w.setFixedWidth(screenWidth);
              w.setFixedHeight(screenHeight);
      
              ce->setFixedWidth(screenWidth);
              ce->setFixedHeight(screenHeight);
      
              ce->setStyleSheet("background-color:blue;");
          }
      
      
          w.setCentralWidget(ce);
          w.show();
      
          return a.exec();
      }
      

      The result on iPhone 12pro is:
      ios.jpg

      There is no any red on Desktop (as expected).

      Qt::FramelessWindowHint doesn't work also.

      Does anyone have idea how to deal with it?

      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #2

      @ivazhu I guess for phone apps QML is preferred.

      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