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. QWebEngineView crash when I try to resize it
Forum Update on Monday, May 27th 2025

QWebEngineView crash when I try to resize it

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 448 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.
  • N Offline
    N Offline
    NintyS
    wrote on last edited by NintyS
    #1

    Hello, I try this

    view->setGeometry(0, 0, ui->label->size().width(), ui->label->size().height());
    

    and this

    view->resize(ui->label->size().width(), this->size().height());
    

    and when I just resize it then my program crash with log in console "Forced shutdown program". What I have to do now?

    jsulmJ 1 Reply Last reply
    0
    • N NintyS

      Hello, I try this

      view->setGeometry(0, 0, ui->label->size().width(), ui->label->size().height());
      

      and this

      view->resize(ui->label->size().width(), this->size().height());
      

      and when I just resize it then my program crash with log in console "Forced shutdown program". What I have to do now?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @NintyS said in QWebEngineView crash wen I try to resize it:

      What I have to do now?

      You should use the debugger and check the stack trace after crash.
      Also check the pointers (like "view") - are those valid?

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

      1 Reply Last reply
      1
      • N Offline
        N Offline
        NintyS
        wrote on last edited by
        #3

        How I supposed to debug one line?

        If I resize or setGeometry in MainWindow::resizeEvent the program crash. Tell me what I supposed to check.

        jsulmJ 1 Reply Last reply
        0
        • N NintyS

          How I supposed to debug one line?

          If I resize or setGeometry in MainWindow::resizeEvent the program crash. Tell me what I supposed to check.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @NintyS said in QWebEngineView crash wen I try to resize it:

          Tell me what I supposed to check.

          As I said: run through debugger and as soon as your app crashes check the stack trace (you can post it here, so others can take a look). Also, you can place break point at exactly that line, run through debugger and as soon as it stops at that line check the pointers (you did not answer my questions about the validity of the pointers).

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

          1 Reply Last reply
          1
          • N Offline
            N Offline
            NintyS
            wrote on last edited by
            #5

            @NintyS said in QWebEngineView crash wen I try to resize it:

            view->resize(ui->label->size().width(), this->size().height());

            Debugger point ta o pointers. ( But I saw another funny thing I have two QWebEngineView one in .H another in .cpp and both named view ). When I reset one from .cpp then works.

            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