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. Window Freeze
Forum Updated to NodeBB v4.3 + New Features

Window Freeze

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.1k 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.
  • B Offline
    B Offline
    brcontainer
    wrote on last edited by
    #1

    What would be the best way to prevent a window freeze the other windows?

    I tried to move my QMainWindow to a thread (QMainWindow::moveToThread), but this is not possible for the widgets can not be moved.

    I'd like to open a new window in a separate process.

    The reason is that if this new page has a script to freeze the window he ends up freezing all other windows.

    @class myWebPage : public QWebPage {
    QWebPage * createWindow(QWebPage::WebWindowType type) {
    Q_UNUSED(type);
    QMainWindow *wx = new mBROWSERQT(NULL,true);
    QWebView wv = wx->findChild<QWebView>("mybrowsertest");

        wx->showNormal();
        return wv->page();
    }
    

    };

    ...

    ui->mybrowsertest->setPage(new myWebPage());@

    QT project: https://github.com/brcontainer/qt-helper

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi,

      you can run the freezing script in other thread.

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • B Offline
        B Offline
        brcontainer
        wrote on last edited by
        #3

        [quote author="mcosta" date="1368775468"]Hi, you can run the freezing script in other thread.[/quote]

        Yes, but how do I do this with QWebPage::createWindow?

        I have to move QWebPage/QWebFrame to another thread (Well as you can see I need to return the QwebPage for the createWindow)?

        bq. Note: What can freeze the windows is the javascript on any website

        QT project: https://github.com/brcontainer/qt-helper

        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