Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Help to do my idea
Qt 6.11 is out! See what's new in the release blog

Help to do my idea

Scheduled Pinned Locked Moved Unsolved QtWebEngine
3 Posts 2 Posters 919 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.
  • F Offline
    F Offline
    Fulgurance
    wrote on last edited by
    #1

    Hello, today i test QWebEngine module to make Web Browser, and i would like to make menu similar to the actual gnome 3 menu in the left (similar to Ubuntu style), and when mouse isn't into this menu, this menu disappear.
    But how can i do that ? Is it possible to show picture into WebView, or i need to some other widgets ? What is your advice ?

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Fulgurance
      wrote on last edited by Fulgurance
      #2

      I have doing this, i think i found good way, but i don't have success to fill the WebView to the MainWindow. When i resize manually the window, webview layout isn't updated, how can i do that ? And if you look my commented code, i have tried to show picture on my webview, but picture is white and i have visible rect, but i don't would like to have visible rect, just my picture...

      #include <QApplication>
      #include <QWidget>
      #include <QGraphicsView>
      #include <QGraphicsPixmapItem>
      #include <QWebEngineView>
      
      int main(int argc, char *argv[])
      {
          QApplication application(argc, argv);
      
          QWidget MainWindow;
          MainWindow.showMaximized();
      
          QWebEngineView webview(&MainWindow);
          webview.setUrl(QUrl(QStringLiteral("https://www.google.fr")));
          webview.show();
      
          //QGraphicsView view(&MainWindow);
          //QGraphicsPixmapItem item(QPixmap("Image.png"));
          //view.setGeometry(0,0,60,60);
          //view.show();
      
          return application.exec();
      }
      
      
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        If MainWindow is a QMainWindow subclass then call setCentralWidget.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1

        • Login

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