<?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[Help with my camera qt]]></title><description><![CDATA[<p dir="auto">Hi i am trying to record my camera i used this code:</p>
<p dir="auto">#include "../headers/webcamwin.h"<br />
#include &lt;QFile&gt;<br />
HWND hwndVideo; // video capture window<br />
void encender()<br />
{<br />
// ::hwndVideo = capCreateCaptureWindowA("captura",WS_POPUP ,1,1 ,240 ,320,NULL,0);<br />
//capDriverConnect(::hwndVideo,0);<br />
//capPreviewRate(::hwndVideo,100);<br />
//capPreviewScale(::hwndVideo,false);<br />
}</p>
<p dir="auto">void apagar()<br />
{<br />
//capDriverDisconnect(::hwndVideo);<br />
//DestroyWindow(::hwndVideo);<br />
::hwndVideo = NULL;<br />
}</p>
<p dir="auto">QPixmap capturar()<br />
{<br />
//capGrabFrame(::hwndVideo);<br />
QPixmap imagen;<br />
QFile crear;<br />
<a href="//crear.setFileName" target="_blank" rel="noopener noreferrer nofollow ugc">//crear.setFileName</a>("data");<br />
<a href="//crear.open" target="_blank" rel="noopener noreferrer nofollow ugc">//crear.open</a>(QFile::WriteOnly);<br />
<a href="//crear.close" target="_blank" rel="noopener noreferrer nofollow ugc">//crear.close</a>();<br />
//capFileSaveDIB(::hwndVideo,L"data");<br />
<a href="//imagen.load" target="_blank" rel="noopener noreferrer nofollow ugc">//imagen.load</a>("data");<br />
return imagen;<br />
}</p>
<p dir="auto">But i get these errors:<br />
C2065: 'WS_POPUP' : undeclared identifier<br />
and more errors like identifier not found.</p>
<p dir="auto">My question is: I need to include some class or some library. Thanks in advance.</p>
]]></description><link>https://forum.qt.io/topic/71579/help-with-my-camera-qt</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 11:40:18 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/71579.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 24 Sep 2016 17:29:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Help with my camera qt on Sun, 25 Sep 2016 21:16:03 GMT]]></title><description><![CDATA[<p dir="auto">this is solved you can include the library and works</p>
]]></description><link>https://forum.qt.io/post/349831</link><guid isPermaLink="true">https://forum.qt.io/post/349831</guid><dc:creator><![CDATA[RIVOPICO]]></dc:creator><pubDate>Sun, 25 Sep 2016 21:16:03 GMT</pubDate></item><item><title><![CDATA[Reply to Help with my camera qt on Sun, 25 Sep 2016 18:51:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andy314">@<bdi>Andy314</bdi></a> with qcamera you could take pictures, turn on camera and many things. I dont know why you say this. I was trying with win api because i always do with this way and before works old versions. Now  you could use the qcamera and works but i only want to combinate with functions and  i am little newbie for this i take help. If you need help i could help you. If you want check in YouTube you will get a easy tutorial:<br />
<a href="https://www.youtube.com/watch?v=9oQZPqi47Y8" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.youtube.com/watch?v=9oQZPqi47Y8</a></p>
]]></description><link>https://forum.qt.io/post/349817</link><guid isPermaLink="true">https://forum.qt.io/post/349817</guid><dc:creator><![CDATA[RIVOPICO]]></dc:creator><pubDate>Sun, 25 Sep 2016 18:51:00 GMT</pubDate></item><item><title><![CDATA[Reply to Help with my camera qt on Sun, 25 Sep 2016 17:59:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rivopico">@<bdi>RIVOPICO</bdi></a><br />
I spend a lot of time with the QCamera for my project until I found that that the camera api is nearly not supported for windows.<br />
Video works never  !<br />
Camera takes always photos with the lowest resolution. No change to change it with Qt.<br />
No flash or an other feature of the camera is suppoedt.</p>
<p dir="auto">So forget the QCamera for windows, I use the integrated windows camera software now,<br />
but I am very interested how to use the windows api to access the camera in Qt.</p>
]]></description><link>https://forum.qt.io/post/349810</link><guid isPermaLink="true">https://forum.qt.io/post/349810</guid><dc:creator><![CDATA[Andy314]]></dc:creator><pubDate>Sun, 25 Sep 2016 17:59:35 GMT</pubDate></item><item><title><![CDATA[Reply to Help with my camera qt on Sun, 25 Sep 2016 01:04:00 GMT]]></title><description><![CDATA[<p dir="auto">Hi i am trying to record my camera with qcamera but i dont have many experience.</p>
<p dir="auto">I declare in headers this:</p>
<p dir="auto">#include &lt;QPixmap&gt;<br />
#include &lt;QDir&gt;<br />
#ifdef Q_WS_WIN<br />
#include &lt;windows.h&gt;<br />
#include &lt;vfw.h&gt;<br />
#endif</p>
<p dir="auto">class QCamera;<br />
class QCameraViewfinder;<br />
class QCameraImageCapture;<br />
class QVBoxLayout;<br />
class QMenu;<br />
class QAction;</p>
<p dir="auto">QAction *mEncenderAction;<br />
QAction *mApagarAction;<br />
QAction *mCapturarAction;</p>
<pre><code>QPixmap capturar();
void encender();
void apagar();
</code></pre>
<p dir="auto">cpp file:<br />
#include "../headers/webcamwin.h"<br />
#include &lt;QFile&gt;<br />
#include &lt;QCamera&gt;<br />
#include &lt;QCameraViewfinder&gt;<br />
#include &lt;QCameraImageCapture&gt;<br />
#include &lt;QVBoxLayout&gt;<br />
#include &lt;QMenu&gt;<br />
#include &lt;QAction&gt;<br />
#include &lt;QFileDialog&gt;</p>
<p dir="auto">void encender()<br />
{<br />
connect(mApagarAction,&amp;QAction::triggered,<a>&amp;</a>{</p>
<pre><code>    mCamera-&gt;start();
});
</code></pre>
<p dir="auto">}</p>
<p dir="auto">void apagar()<br />
{</p>
<pre><code>mCamera-&gt;stop();
</code></pre>
<p dir="auto">}</p>
<p dir="auto">QPixmap capturar()<br />
{</p>
<pre><code>connect(mCapturarAction,&amp;QAction::triggered,[&amp;](){
    auto filename = QFileDialog::getSaveFileName(this,"Capturar","/",
                                 "Imagen(*.jpg;*.jpeg)");
    if(filename.isEmpty()){
        return;
    }
    mCameraImageCapture-&gt;setCaptureDestination(
                          QCameraImageCapture::CaptureToFile);
    QImageEncoderSettings imageEncoderSettings;
    imageEncoderSettings.setCodec("image/jpeg");
    imageEncoderSettings.setResolution(1600,1200);
    mCameraImageCapture-&gt;setEncodingSettings(imageEncoderSettings);
    mCamera-&gt;setCaptureMode(QCamera::CaptureStillImage);
    mCamera-&gt;start();
    mCamera-&gt;searchAndLock();
    mCameraImageCapture-&gt;capture(filename);
    mCamera-&gt;unlock();
});
</code></pre>
<p dir="auto">}</p>
<p dir="auto">Obviously doesnt work. I only want that when i call one determined function, the camera do (up,off, or record). Sorry for all.</p>
]]></description><link>https://forum.qt.io/post/349727</link><guid isPermaLink="true">https://forum.qt.io/post/349727</guid><dc:creator><![CDATA[RIVOPICO]]></dc:creator><pubDate>Sun, 25 Sep 2016 01:04:00 GMT</pubDate></item><item><title><![CDATA[Reply to Help with my camera qt on Sat, 24 Sep 2016 18:34:38 GMT]]></title><description><![CDATA[<p dir="auto">Why do you use the Windows API instead of QCamera?</p>
]]></description><link>https://forum.qt.io/post/349700</link><guid isPermaLink="true">https://forum.qt.io/post/349700</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sat, 24 Sep 2016 18:34:38 GMT</pubDate></item></channel></rss>