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. setMaximunSize(?,?)
Forum Updated to NodeBB v4.3 + New Features

setMaximunSize(?,?)

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

    The following function executes the program according to the set size(960x640).

    setMinimumSize(960, 640);
    

    When I first run the program, I want to set the browser to full screen size. How can I do this?
    setMaximunSize(?,?)

    Pl45m4P 1 Reply Last reply
    0
    • M MyNameIsQt

      The following function executes the program according to the set size(960x640).

      setMinimumSize(960, 640);
      

      When I first run the program, I want to set the browser to full screen size. How can I do this?
      setMaximunSize(?,?)

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @MyNameIsQt

      What browser?!

      You can show any window widget in fullscreen mode using

      widget->showFullScreen();
      
      

      or try

      widget->showMaximized();
      

      for maximum size window widget.

      Note: Both might not work on all platforms/window managers.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      M 2 Replies Last reply
      1
      • Pl45m4P Pl45m4

        @MyNameIsQt

        What browser?!

        You can show any window widget in fullscreen mode using

        widget->showFullScreen();
        
        

        or try

        widget->showMaximized();
        

        for maximum size window widget.

        Note: Both might not work on all platforms/window managers.

        M Offline
        M Offline
        MyNameIsQt
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • Pl45m4P Pl45m4

          @MyNameIsQt

          What browser?!

          You can show any window widget in fullscreen mode using

          widget->showFullScreen();
          
          

          or try

          widget->showMaximized();
          

          for maximum size window widget.

          Note: Both might not work on all platforms/window managers.

          M Offline
          M Offline
          MyNameIsQt
          wrote on last edited by
          #4

          @Pl45m4
          Thanks :)
          I solve it.

          WpubEditor::WpubEditor(QWidget *parent)
              : QMainWindow(parent)
              , ui(new Ui::WpubEditor)
              , styleSheet()
              , mainLayout(nullptr)
              , vBoxLayout(nullptr)
              , buttonLayout(nullptr)
              , btnWrapper(nullptr)
              , stackedLayout(nullptr)
              , buttonLabel(nullptr)
              , m_pPubManager(nullptr)
              , webView(nullptr)
              , channel(nullptr)
          {
              //setMinimumSize(960, 640);
          
              ui->setupUi(this);
          
              webView = new QWebEngineView(this); // QWebEngineView 객체 초기화
              setCentralWidget(webView);
          
              QString htmlPath = QFileInfo(__FILE__).dir().absolutePath() + "/main.html";
          
              QFile file(htmlPath);
              if (file.exists()) {
                  webView->load(QUrl::fromLocalFile(htmlPath));
              } else {
                  qDebug() << "Failed to load canvas.html. File not found.";
              }
          
              channel = new QWebChannel(webView->page());
              webView->page()->setWebChannel(channel);
              channel->registerObject("wpubEditor", this);
          
              createStatusBar();
              initResources();
          
              showMaximized();
          
          }
          
          1 Reply Last reply
          0
          • M MyNameIsQt has marked this topic as solved on

          • Login

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