<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Open URL with js window.open like window in user&#x27;s default browser?]]></title><description><![CDATA[<p dir="auto">I am trying to program with <code>QOAuth2AuthorizationCodeFlow</code>. From demos the authorization is performed by</p>
<pre><code>    connect(ptrToQOAuth, &amp;QOAuth2AuthorizationCodeFlow::authorizeWithBrowser, &amp;QDesktopServices::openUrl);
</code></pre>
<p dir="auto">which will open user's default browser for the authorization page.<br />
However, this has two problems:</p>
<ol>
<li>I lose control of the opened webpage and cannot close it after authorization finished. JS code <code>window.close</code> in the  redirected page cannot close the page in many browsers for security reason.</li>
<li>The page becomes a tab in the browser rather than a popup window.</li>
</ol>
<p dir="auto">One possibility is to open a widget with QWebView and close the window when from <code>QOAuth2AuthorizationCodeFlow</code> class when it receives relevant signals.</p>
<p dir="auto">But is there anyway that we can open a popup window with the authorization page, something like js <code>window.open</code>, with user's default browser rather than another Qt Widget, so that OAuth2 provider can use user's cookie.</p>
]]></description><link>https://forum.qt.io/topic/99746/open-url-with-js-window-open-like-window-in-user-s-default-browser</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 16:36:11 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/99746.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 15 Feb 2019 20:59:25 GMT</pubDate><ttl>60</ttl></channel></rss>