Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. html
    Log in to post

    • UNSOLVED webview security
      QML and Qt Quick • qt quick javascript webview html security • • addr3ss  

      2
      0
      Votes
      2
      Posts
      46
      Views

      @addr3ss No, it's not. Resources are compiled into the executable and can be easily extracted from there. What kine of information is it?
    • UNSOLVED Back button click Android not registered in Qt Webview
      Mobile and Embedded • qml android html qt5.10 • • Ramonn  

      1
      0
      Votes
      1
      Posts
      536
      Views

      No one has replied

    • UNSOLVED Paint shadow inside an QImage or QGraphicsEffect Shadow... html page doc
      General and Desktop • html qabstractscroll qgraphicseffect • • patrik08  

      3
      0
      Votes
      3
      Posts
      827
      Views

      Tanks .... Compiler accept only this way ...... ;-) #ifdef QT_NO_GRAPHICSEFFECT QImage applyEffectToPics(QImage src, QGraphicsEffect *effect, int extent = 0) { if(src.isNull()) return QImage(); //No need to do anything else! if(!effect) return src; //No need to do anything else! QGraphicsScene scene; QGraphicsPixmapItem item; item.setPixmap(QPixmap::fromImage(src)); item.setGraphicsEffect(effect); scene.addItem(&item); QImage res(src.size()+QSize(extent*2, extent*2), QImage::Format_ARGB32); res.fill(Qt::transparent); QPainter ptr(&res); scene.render(&ptr, QRectF(), QRectF( -extent, -extent, src.width()+extent*2, src.height()+extent*2 ) ); return res; } #endif
    • SOLVED Tag html on QString not applied when contains "\n"
      General and Desktop • qstring html color • • helenebro  

      2
      0
      Votes
      2
      Posts
      736
      Views

      Then use "<br>" instead of "\n"
    • UNSOLVED QTextView changes the HTML string
      General and Desktop • html • • moravas  

      7
      0
      Votes
      7
      Posts
      1115
      Views

      @moravas QTextEdit and buddies only support rich-text and are not suitable for full HTML editing. You should use either QtWebkit module or QtWebEngine (depending on the Qt version you are using) and set the contents editable. But at least QtWebkit (and i guess also QtWebEngine) changes the content a little bit, but the HTML stays valid all the time at least.
    • UNSOLVED Is there a clear way to parse HTML in Qt 5.7
      Qt WebKit • c++ linux windows html parser • • lmofallis  

      15
      0
      Votes
      15
      Posts
      11480
      Views

      @cochise said in Is there a clear way to parse HTML in Qt 5.7: https://github.com/cutelyst/html-qt This is a bit of an old thread but as @cochise said html-qt is an HTML parser, sadly I didn't finish it yet but it follows WHATWG specification on how to implement an HTML parser as HTML is not XML. It's mostly complete but outputting a DOM tree isn't ready yet, so help is welcome.
    • GUI creation guidance / HTML+JS?
      General and Desktop • gui javascript html • • DavideBarranca  

      3
      0
      Votes
      3
      Posts
      1082
      Views

      @raven-worx Thank you for pointing me to the proper documentation pages – I'll have a look at them asap. If the project actually takes off, I'll be a regular in the forums :-) Best regards, – Davide
    • UNSOLVED Parse HTML in Qt 5.7
      General and Desktop • html parsing • • AliReza Beytari  

      12
      0
      Votes
      12
      Posts
      4808
      Views

      @Joel-Bodenmann So I can just use "runJavaScript" function ?! @SGaist No, that was just an example !! :D
    • UNSOLVED How to ensure that an HTML-table in QTextEdit is copied as a table when pasting into for instance Excel?
      General and Desktop • qt5.6 qtextedit html copy • • Jakob  

      5
      0
      Votes
      5
      Posts
      1291
      Views

      @raven-worx Thanx for the suggestion. I think we can go a long way with this, except that we are on Windows and it seems we need some Windows-specific MIME-conversions. We'll try to tinker a bit with that.
    • SOLVED How to display received HTML from an API to webview ?
      QML and Qt Quick • qt quick webview html • • Qjay  

      8
      0
      Votes
      8
      Posts
      2603
      Views

      @Wieland Thanks !! it works fine . I will now complete the QMLbook . i am still noob :/ Thanks for the help
    • SOLVED Saving content from QTextEdit in QFile to a path without a QFileDialog
      General and Desktop • qfile html save • • HenrikSt.  

      8
      0
      Votes
      8
      Posts
      3624
      Views

      @HenrikSt. You got a number of different possibilities suggested. Possibly you are overwhelmed by the different things. Sometimes it is hard for the people answering to know where the real problem was/is. I am not sure now if this might be too detailed for you. Anyway I move forward. I would suggest, if you have not done yet, The example from QFile as also listed by @jsulm and play a bit around. Just change the file name to somthing you need. E.g. QFile file("c:/data/myNewFolder/out.txt"); That is a possibility to specify a complete (absolute) file name. If you are a beginner, I was in that stage before as all the others, there might be a problem with the not existing folder name, if your file not created. There is QDir::mkPath, which is slightly different from mkDir. It may help you in code to ensure that you actually can create the file. The other thing driving me personally nuts is the stupid folder separator for windows, which is a back slash '\'. However, in the mean time you can easily substitute with a forward slash also for most things in Windows (especially Qt). This also part of some of the suggestions. If you have difficulties sometimes it helps for others to post a short section of code and the error message.
    • UNSOLVED QWebView - Pb to display HTML table with rowspan with QT5.5
      General and Desktop • qt5.5 qwebview css html table • • Morgar  

      1
      0
      Votes
      1
      Posts
      903
      Views

      No one has replied

    • SOLVED QLabel - mouseReleaseEvent to parent - HTML label
      General and Desktop • qlabel html mouseevent • • antonlindgren  

      7
      0
      Votes
      7
      Posts
      2412
      Views

      @mrjj Wow, super. That actually solved it. Thank you so much for your response, your time and your help. I really appreciate it. Thanks. Best regards, Anton
    • SOLVED How to insert a div into a QTextEdit?
      General and Desktop • qtextedit html • • Ctwx  

      4
      0
      Votes
      4
      Posts
      3793
      Views

      I don't really like that As I said - QTextEdit is not an HTML browser. It handles rich text and stores it as styled text blocks. It accepts subset of HTML as input but it does not store it as such. So it doesn't put the content in <p>. It simply has no notion of <p>, <div> etc. at all. That's the source of the remark in the docs, that the stylesheet is only applied on entry. After that there are no <div> to style. The output you get back is a result of another conversion, where every paragraph is simply output as <p>. It does not reflect what you input. Take a look at the link I posted previously. QTextEdit supports only subset of HTML/CSS. It does not support class attribute or a "border" CSS property. How about you try to operate directly on text blocks, and not go through HTML? Here's an example for a chat-like formatting: QTextBlockFormat tbf1; tbf1.setAlignment(Qt::AlignLeft); tbf1.setBackground(Qt::red); QTextBlockFormat tbf2; tbf2.setAlignment(Qt::AlignRight); tbf2.setBackground(Qt::green); ui->textEdit->textCursor().beginEditBlock(); ui->textEdit->textCursor().setBlockFormat(tbf1); ui->textEdit->textCursor().insertText("Wassup?\n"); ui->textEdit->textCursor().endEditBlock(); ui->textEdit->textCursor().beginEditBlock(); ui->textEdit->textCursor().setBlockFormat(tbf2); ui->textEdit->textCursor().insertText("Nothin' much\n"); ui->textEdit->textCursor().insertText("Just playin' a game. How 'bout you?\n"); ui->textEdit->textCursor().endEditBlock(); ui->textEdit->textCursor().beginEditBlock(); ui->textEdit->textCursor().setBlockFormat(tbf1); ui->textEdit->textCursor().insertText("Nothin' much\n"); ui->textEdit->textCursor().endEditBlock();
    • UNSOLVED Changing HTML in QtWebView
      Mobile and Embedded • qml android html qtwebview • • mkeezy  

      1
      0
      Votes
      1
      Posts
      514
      Views

      No one has replied

    • UNSOLVED Qwebview and printer issue(paper size)
      General and Desktop • qwebview html qprinter • • Nouriemm  

      2
      0
      Votes
      2
      Posts
      841
      Views

      Anyone? Any Idea?
    • SOLVED Parsing HTML content
      General and Desktop • html qwebkit • • Bagavathi  

      5
      0
      Votes
      5
      Posts
      1554
      Views

      Good point, I should have added that if it's only to parse html tables, the XML parser should be enough.
    • UNSOLVED Printing QWebView wia QPrinter exceeds page in QPrintPreviewDialog
      General and Desktop • qwebview html qprinter qprintpreviewdi • • SebastianS  

      1
      0
      Votes
      1
      Posts
      562
      Views

      No one has replied

    • UNSOLVED Hint about help documentation
      General and Desktop • html help pdf • • Mark81  

      2
      0
      Votes
      2
      Posts
      871
      Views

      Found: Sphinx
    • QWebView can't show image while Html file using <img src="file://..."> instead <img src="file:///...">
      General and Desktop • qwebview file html local file • • kkkiio  

      1
      0
      Votes
      1
      Posts
      993
      Views

      No one has replied

    • [Solved] QTextDocument with < and > characters
      General and Desktop • html qtextdocument • • Endless77  

      2
      0
      Votes
      2
      Posts
      772
      Views

      < and > are special characters in html. To display them literally you can use entities: &lt; and &gt; i.e. &lt;80 will result in <80. For a list of possible entities you can scout the web, e.g. here.
    • Render HTML to QPixmap - QWebFrame render() method with transparent background
      Qt WebKit • qpixmap html pixmap qpalette qwebframe • • NiHoTleHot  

      0
      0
      Votes
      0
      Posts
      683
      Views

      No one has replied

    • Calling Qml function From JavaScript (js function called from html)
      General and Desktop • qml javascript html • • pankaj4288  

      8
      0
      Votes
      8
      Posts
      7950
      Views

      I am having more issues in it. When I run this on my andorid devices. It runs fine for teh forst time, but after that it shows me below error- I/chromium(17111): [INFO:CONSOLE(16)] "WebSocket connection to 'ws://127.0.0.1:12345/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED" Can someone help me ?
    • [SOLVED] A png image within HTML code in a QTextEdit
      General and Desktop • image qtextedit html • • sirop  

      8
      0
      Votes
      8
      Posts
      5540
      Views

      @ChrisW67 said: The relative path will be relative to the current working directory of the running process. This is >quite unlikely to be where the source code is (esp. if you are shadow building). Your hint is almost right. Of course, I use the build and not the source directory. The point is that QTextEdit understands the image path within the HTML file also only if the image path is relative to the working dir of the running process and not to the directory of the HTML file. So now my HTML file looks like: <html> <head> <title></title> </head> <body> <h2> TEST <img src='html\images\Diagramm-mit-Dehngrenzen.png' height='480' width='480'> </h2> </body> </html> Which slashes -- forward or backward -- I use, does not matter. However, now neither firefox nor opera show the image as you can understand.
    • Pobieranie strony WWW/HTML z sieci za pomocą Qt
      Polish • html socket internet www strona internet parsowanie parsowanie stro • • Huragan  

      9
      0
      Votes
      9
      Posts
      2974
      Views

      @cybercatalyst Rozumiemy, nie martw się. :) Nigdy, jak dotąd nie korzystałem z klasy QEventLoop. Dzięki za podsunięcie pomysłu, kolejnego sposobu na rozwiązanie tego problemu. :) [ENG] If you don't understand what I wrote, I can rewrite this at english. :) I suppose you speak english. :)
    • HTML img qrc Resource does not display
      Mobile and Embedded • android html ressource • • didu  

      8
      0
      Votes
      8
      Posts
      3012
      Views

      @Malek_Khlif said: @didu said: <RCC> <qresource prefix="/images"> <file>About.ico</file> <file>ic_launcher.png</file> </qresource> </RCC> Edit this resource: <RCC> <qresource prefix="/images"> <file>About.ico</file> <file alias"ic_launcher.png">ic_launcher.png</file> </qresource> </RCC> Also same result :( Otherwise I have other pictures in same qrc that show perfectly on both platforms ! The only difference is that I use html to display this one ! Does anyone have succeed to display on android with html like I do ?
    • [SOLVED]Problem when using second socket.
      General and Desktop • html socket tcp smtp • • ealione  

      12
      0
      Votes
      12
      Posts
      2844
      Views

      You're welcome