Click here to Skip to main content
15,889,992 members
Everything / Desktop Programming / QT

QT

QT

Great Reads

by The Ænema
This article will teach you how to create an amazing, clean and smooth WPF/Winform UI for your native application without using any complex, unsafe, ActiveXish methods, etc.
by Andrew Kirillov
An open source application to acquire and process video from cameras
by ashcairo
How to use OpenGL and friends to write an app that targets mobile and desktop platforms.
by Marco Bertschi
A brief step-by-step guide on what is needed to get Qt and the Qt Creator installed on your Linux environment

Latest Articles

by Dawid Borycki
In this article, you will build a Qt-based Python application with two C/C++-based DLL dependencies. This architecture mimics a typical scenario of using Python and Qt for rapid UI prototyping and DLLs for computation-intense work.
by CodingKnight
An examination of PySide and PyQt to help find out which one to use
by CodingKnight
Comparison of PyQt and Tkinter
by Igor Gribanov
Property browsing is a common task and many standalone libraries already exist, but let's explore the built-in functionality in Qt library to handle this.

All Articles

Sort by Title

QT 

29 Dec 2011 by danger man 2011
There is any library that support 2d-barcode image generator in python ?? i need any help to generate a 2d-barcode (QR-code) ??
29 Dec 2011 by Wendelius
Perhaps this[^] would help.
28 Feb 2012 by danger man 2011
download this package http://www.mediafire.com/?koht7wk3adp5g4vthen import it in your program then call it by this code :qr.run_example(data)
23 Aug 2012 by Alesiani Marco
A concept-tool to create interactive documentations for C/C++ projects
10 May 2014 by mary99
hi.i have program it has some classes.one of these classes inherites from QMainwindow.i write blew code to put QScrollArea in this code.i have two problem.1_ two windows open(main window of program with a empty window).2_ when main window is in minimum state,it shows horizontal and vertical...
18 Jun 2013 by petunia74
Hi !I am writing a program in qt creator and at first when the program is runing I should enter username and password and it should check if the username or password exist in the file . but i dont know how to do it and how to check a file lines .could you tell me ?
18 Jun 2013 by User 59241
Always try Google first. For example for username password entry:http://www.nkonecny.com/blog/2011/09/30/creating-a-user-login/[^]Basic file I/o is explained herehttp://www.learncpp.com/cpp-tutorial/136-basic-file-io/[^]You can start with the example and modify it to your...
26 Mar 2012 by shimmer8711
Good evening, I have a problem when I load .so into QT project.firstly, I copy libexpat.so to the project folder.secondly, I add INCLUDEPATH += ../include/expat LIBS += -L -lexpat to .pro fileBut the application also reminds cannot find the libexpat's functions, I don't know why...
2 Dec 2018 by UA12
I am new to this stuff so need help in writing the unit test. GitHub - KDE/kpmcore: Library for managing partitions. Common code for KDE Partition Manager and other projects.[^] What I have tried: Since I am new, I am not sure how I should get started.
2 Dec 2018 by Richard MacCutchan
Start by learning the subject. Google will find you lots of materials.
7 Apr 2013 by ronyttyy
watch los angeles clippers vs los angeles lakers livehttp://freelivefootballstream.blogspot.com/2013/03/live-nba-stream.htmlwatch los angeles clippers vs los angeles lakers livehttp://freelivefootballstream.blogspot.com/2013/03/live-nba-stream.htmlwatch los...
2 Jun 2010 by PreetiJuneja
on running the code in the link given below...gives an eror that Cannot open include file: 'satellitedialog.h': No such file or directory...why this error and how it can be removed..??http://doc.qt.nokia.com/qtmobility-1.0/weatherinfo.html[^]
2 Jun 2010 by Sandeep Mewara
PreetiJuneja wrote:gives an eror that Cannot open include file: 'satellitedialog.h': No such file or directoryThis simply means that there is a reference to 'satellitedialog.h' somewhere in your code. But the file said is missing.PreetiJuneja wrote:why this error and how it can be...
24 Dec 2020 by CodeProjectQuestions
After public it says expected expression. why and how do I fix it? #include #include "soundevent.h" SoundEvent::SoundEvent() { public:
24 Dec 2020 by Rick York
The problem is this : SoundEvent::SoundEvent() That is the implementation of the class' constructor. That appears to be the declaration of the class which should appear like this : class SoundEvent { public: SoundEvent( qint64 timestamp = 0,...
5 Jul 2011 by zargami
bonjour à tous, Je m'apprête à démarrer un petit projet , une application de gravure CD/DVD (c++/qt). Est ce que quelqu'un pourra m'indiquer les librairies C++ (Open Source / Compilation statique / multi-plateformes ) que je pourrai utiliser?(qui pourra être compiler en statique "CMAKE" si...
5 Jul 2011 by Christian Graus
I used a library called XPBurn. I have no idea if it's still supported, or if it works in Windows 7.
20 Feb 2017 by PatGulotta
An easy to use C++/Qt/Qml Floating Action Menu providing the ability to add Floating Actions Menus to a Qt/Qml cross-platform project.
17 Jul 2011 by john19922
Hi alli've got this error:http://i.stack.imgur.com/Sdkcr.jpg[^] (my code) http://i.stack.imgur.com/LkQkn.jpg[^] (my error)why is it for?ANY idea will be appreciated.please tell me ANY idea you have.thanks.[edit]Links linkified - OriginalGriff[/edit]
17 Jul 2011 by CPallini
You should link with the pthread (POSIX threads) library. The gcc command line option is -lpthread, check out your IDE documentation for the appropriate setting.
18 Oct 2014 by Marco Bertschi
A short guide on how you can style and customize the appearance of you QML controls in a CSS-like way
12 Oct 2010 by Bhavana S. Mundada
Hi all..I am GLSL beginner. I am using shader with Qt's OGL module.I have created a shader and have drawn an image on the QGLWidget but stuck about how to apply the shader to the image object.e.g. I have created a shader for brightness, but how to apply gl_fragcolor value to the...
10 Oct 2010 by GPUToaster™
I'm not sure what QT syntax is...But in general a GLSL is compiled and Attached to an object. In this case,1. create an object which will point to your shader program.2. look out for an attach() method. (may be like widget->attach(ShaderObject *)).In this way you can attach shader...
12 Oct 2010 by Bhavana S. Mundada
Please Hv a Look at my code and let me know how to use gl_FragColor Value while Updating the image in paintGL() Function.void GLWidget::initializeGL(){ //***************Shader for Brightness************************// QGLShader *vshader1 = new QGLShader(QGLShader::Vertex,...
24 Nov 2015 by XamBEE
here is the section of code which facing this problem..QString line = in.readLine(); QStringList fields = line.split(","); fields.replaceInStrings(" ", ""); QString IDstr = fields[0]; int slotDec = fields[1].toInt(&ok, 16); int...
24 Nov 2015 by KarstenK
normally means that exception that the list hasnt that size. Check it before any access. Is your input correct for your splitting?Plz learn to use a debugger.
24 Nov 2015 by CPallini
You are assuming fields[1] exists, that is the QStringList contains at least two items. Such an assumption, according to the documentation[^], is wrong.
24 Nov 2015 by Naveen.Sanagasetti
As per error message "Index out of range", if you are trying to access the outside the range of the index then you will get this type of error, in your code you are calling fields[1] if there is no field with that particular index then you will get this type of error.To resolve this type of...
17 Jan 2016 by Keno Rosario
I have multiple of usb sound card connected to my system and i want to record one certain signal for each sound card. How will I call the name of my USB sound card to work properly without having a dropdown list box on my gui. Direct assigning of sound card is what i am after. Thanks a...
18 Jan 2016 by Jochen Arndt
The QAudioRecorder Class[^] provides the audioInputs() function returning a list of available names. If you don't want a list box to select from these but use hard coded names, just print the list once to know the names that can be used on your system.There is also the function...
27 Mar 2016 by stackprogramer
my question is when i build release mode my simple app,how i can create exe file?i tested this solution: Let's say you've installed QT under c:\qtsdk Open your project, and compile it in release mode. Go to this directory: C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin -- it contains...
17 Sep 2016 by stackprogramer
i shared solution here best way is cd $dir_projectqmake project.promingw32-makefinally execute file will be created.
10 Sep 2013 by Nguyen Hung Duong
I have the following prolem:After extracting qt-everywhere-opensource-src-4.8.5, when I configured it, I got the following message:Basic XLib functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in...
10 Sep 2013 by E.F. Nijboer
How about installing the non dev packages first? What happens if you install the list of dependencies given in the list? It may also help a lot to use synaptic.If not installed: sudo apt-get install synapticGood luck!
1 Jul 2012 by Luis Felipe Dominguez Vega
I need to know about of an application or an idea for report bugs in my app, example.... AppReport... In language C++, better if is in Qt Framework, not Win2 MVC
1 Jul 2012 by Albert Holguin
Not exactly sure if this is what you are asking... but I'll give it a shot. For bug tracking and reporting I've been using Bugzilla[^] for a number of years and it works great. There are a number of large companies that use it and they are open source. I host the software on a Linux...
4 Jul 2012 by Luis Felipe Dominguez Vega
Good, but, i think more than, example an element in my code for explain more the bugs.... Example, when my app crash i want to throw a windows to send information about the crash, how Apport or KDE Crash Handler.....
29 Jan 2013 by Bhavin Jagad
Hi All, I have installed Qt 5.0.0 on my windows xp system.My target is to play video with videowidget example given with Qt 5.0. Its located at following path on my machine.C:\Qt\Qt5.0.0\5.0.0\msvc2010\examples\multimediawidgets\videowidgetWhen i execute example it could not...
5 Feb 2013 by Matthew Faithfull
If your Qt 5 sample application is not working then you have an issue with the installation of Qt. Make sure you already have a working VC2010 on your machine as this is what the sample seems to require. Qt usual has a "build all samples" project or script file that you need to run after...
5 Feb 2013 by Bhavin Jagad
I included following file "qedit.h", in my microsoft sdk path "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include"Here the qedit.h file.
12 Dec 2010 by crazykuza
Hello,I build my project (exe) which use QT Framework with makefile under vc++ It works fine:-----Build : qmake & nmakeRebuild : qmake -project & qmake & nmakeOutput : Debug\QT_Test.exe*****Build : qmake & nmake releaseRebuild : qmake -project & qmake & nmake...
15 Dec 2010 by Chris Meech
I'd recommend creating a brand new project. The target for the project would be the DLL that you require. Add your existing source code files to the project and things should build. Someting to consider though is that typically EXEs and DLLs have different entry points and usually DLLs will...
15 Aug 2015 by Afzaal Ahmad Zeeshan
Ah, same question from Quora, maybe same user from there too? :laugh:I answered this question on Quora in the following words: Afzaal Ahmad Zeeshan on Quora[^]:Qt... never will be used. But, as Qt claims it can create applications for every platform. You also are aware of Qt and can...
16 Nov 2022 by Member 8840306
I am new in C++ 98 with QT-4 in netbeans 8.1 . I am trying to make data base connection using this code. #include "newForm.h" #include #include #include #include using namespace std; #include...
16 Nov 2022 by OriginalGriff
Auto commit mode means that as soon as a statement is executed, Commit is called on the connection. At a guess - and I have no access to your system for testing - the setSchema call throwing an error probably means that the DB name...
5 Jul 2013 by smss IR
Hello everybody.In chapter 02 of "C++ GUI Programming with Qt4, 2nd edition" is an example which when I implemented, compiled and run it, give me an error about segmentation fault.I uploaded all the codes at : http://ubuntuone.com/1BwwCaFw9801KfL39I7cA6[^] (about 22 Kb)Thanks a lot of...
9 Jul 2013 by KarstenK
use the debugger to find the exact crash location. And than search for working sample code of that piece.
14 Jun 2018 by Sukerbek
Hello every one how can i split an array into blocks.For example Given an array of size 4x4 divide the array by blocks of 2x2 and then the size of the array is 4x4 so there will be four blocks of 2x2. In this case block size is 2; Block 1 Block2 0 1 0 0 ...
14 Jun 2018 by User 7429338
How about: int block[4][4] = { { 0,1,0,0 }, { 1,1,1,0 }, { 0,0,0,0 }, { 1,1,0,0 } }; int block1[2][2]; int block2[2][2]; int block3[2][2]; int block4[2][2]; for (int i = 0; i
6 Sep 2012 by Lemonapple
sorry,i didn't find qt zones,so i put my questions here,it was like this:i use qt4.5.3 and xerces-c-3.0.1 to read xml file,then when i save my files, a problem occurs,m³---change into m3;m² change into m2;my xml format is UTF-8, i searched many websites,and still don't get a...
12 May 2017 by alexey_t
A simple calendar with notes support
4 Aug 2016 by Member 12587659
I want to call c++ function "writeintocsvFile()" to write/append data into CSV file from QML. Would be nice if someone guide me how i can do this??What I have tried:method to call function from QML
4 Aug 2016 by Suvendu Shekhar Giri
Check this thread which seems to have a answer for a similar question.[solved] To call function in C++ from QML | Qt Forum[^]Also, check following article-Integrating QML and C++ | Qt QML 5.7[^]Hope, it helps :)
3 Dec 2015 by XamBEE
From main UI thread i am creating new thread(counterThread) and in new thread i am trying to accesss QfileDialog. it gives me error msg No matching function for call.void MainWindow::on_pushButton_clicked(){ //Start Counter Thread QThread* workerThread = new QThread; ...
3 Dec 2015 by Jochen Arndt
This won't work in a Qt worker thread.From http://doc.qt.io/qt-5/thread-basics.html[^]:Quote:As mentioned, each program has one thread when it is started. This thread is called the "main thread" (also known as the "GUI thread" in Qt applications). The Qt GUI must run in this thread. All...
22 Nov 2017 by TheLostJedi
I have to create and initialise objects of a class called Device in my main program. But the number of objects created are based on the user input. The IDE is Qt so I have access to data structures like QLists. What I have tried: My idea was that in the header file I would declare a Device...
22 Nov 2017 by Jochen Arndt
You can do that but it is bad style. A temporary variable should be local and not a class member: for (int i = 0; i
30 Oct 2015 by Ramiien
I am doing CAN first time using C++: I am using API function to initialize CAN. Function for API CAN intialization is as following/// /// Initializes a PCAN Channel/// /// "The handle of a PCAN Channel"/// "The...
2 Nov 2015 by Ramiien
to access DLL file. use Loadlibrary() and GetProcAddress()for example check this linkhttps://www.c-plusplus.net/forum/128715-full
16 Oct 2021 by Member 14779522
//// serverstartThread.h #ifndef SERVERSTARTTHREAD_H #define SERVERSTARTTHREAD_H #include #include #include "QThread" #include "listenerthread.h" class ServerStart : public QObject { Q_OBJECT signals: ...
9 Oct 2011 by danger man 2011
I need a help.I need a function that when I open my option window, the main window of my program is out of use.Like when I open my computer then from tool>> folder option, than I cant access to my computer.
9 Oct 2011 by André Kraak
I have no experience with either Python or QT, but what you need is a modal window.Using Google[^] I found this http://www.commandprompt.com/community/pyqt/c6351[^].If this doesn't work for you will do your own Google search on how to create a modal window in Pyhton QT.
9 Oct 2011 by danger man 2011
thnx Andre , i found the solutioan :setWindowModality(2)
25 Feb 2012 by alizadeh91
Hello everybody..I've a question about QGraphicsItem.I've casted a qml file to QGraphicsItem (by creating a object by engine). And it's OK . But when i add this QGraphicsItem into a scene and view and i set its flag to be movable nothing will do when i try to drag it.Here is the...
4 Apr 2012 by alizadeh91
I've found it!That's Not possible!! but it can be casted to QGraphicsObject
30 Jan 2014 by Member 10560011
HiI coded a java class, now I need to change it to C++ code, but I am not expert in C++. Can any body change the code to C++ for me? Application: Log Analysis.Developing a new tool for analyising the log files.The given code for parse the log file(Extract the fields from the log...
30 Jan 2014 by CPallini
Well, the program is actually pretty simple. You have only to verify that C++ regex[^] produces the same results the Java package does (or modify the pattern for proper matching). Probably all you need is a tutorial on using the C++ regex. Google is your friend[^].
1 Feb 2014 by merano
As CPallini already sayed; its pretty simple ;-)#include #include #include using namespace std;int main(char *args, int argc){ string line("[03/Dec/2013:10:53:59 +0000] - [32002 10.102.4.254 195.229.241.182 ..."); regex...
26 May 2012 by Reza Oruji
hii am beginner in qti created a GUI application in qt creator and added a push button and a line edit into form by desginer. i want the size of (width and height) lineEdit change when i click push buttonbut when i write this code:void MainWindow::on_pushButton_clicked(){ ...
26 May 2012 by Reza Oruji
ui->lineEdit->setGeometry(10,10,80,30);
28 Feb 2012 by Arun Kumar K S
I have styled my QPushButton using stylesheet. Inside the border of the button and in the corners there are large areas that are not clickable . Using :hover I can see that Qt thinks the mouse is over the button but when I click, no clicked signal.I searched in net but not find any solution ti...
19 Dec 2012 by X Guy
Dear developers,i have a C++ program which is written in QT, now the development stuff is done and it is compiled to be used inside windows but now i want to compile it for linux too.but the thing is i don't know how to do it :-(Note: I'm using QT 4.7.4 32 bit and mingw on windows 7.
19 Dec 2012 by CPallini
It looks using a Linux virtual machine would be the easy path, see the following discussion: http://qt-project.org/forums/viewthread/16474[^].
20 Dec 2012 by Albert Holguin
Well... set up your compiler to and IDE onto your Linux machine (if you use an IDE). Now, you'll have to rebuild your Qt libraries for Linux, that should be in their documentation (although I have noticed their documentation kind of sucks). Once you have built the libraries, configure your IDE...
20 Dec 2012 by IDENguyen
you can use linux open suse. It so good for you to compiler c, or c ++
18 Jun 2012 by Arun Kumar K S
Hi,I am creating one shared library in Linux using Qt and C as programming language. When i compile my code it show me one error like thisexpected ‘)’ before...
18 Jun 2012 by Richard MacCutchan
Should be:void (CALLBACK *managedCallback1)(char **);void (CALLBACK *managedStopCallback)();The extra asterisk before the open parenthesis is incorrect.
4 Apr 2019 by Andrew Kirillov
An open source application to acquire and process video from cameras
30 Oct 2015 by Ramiien
Hi I am new in CPP. very confused between declaration and defination of function.here is my code file name: pcanlinkerclass.cpppCANLinkerClass::pCANLinkerClass(){ LoadAPI();}void pCANLinkerClass::LoadAPI(){ mypcanlinkerfunction(); qDebug()
30 Oct 2015 by CPallini
There must be a method with the same name and signature in the pCANLinkerClass class declaration (usually in the header file), e.g.in pCANLinkerClass header fileclass pCANLinkerClass{//... void mypcanlinkerfunction();//...};
5 Aug 2015 by Sukerbek
Quote:HI everyone recently I am working with FTP server in qt, and then I connected to FTP but in 30 second if I do not do anything with FTP like download or upload, connection is becoming disconnection. who can help me what should I do to solve this problem
5 Aug 2015 by Jochen Arndt
Most FTP servers have a time out value for closing the connection when no requests are received. FTP clients usually have a keep-alive option to send a FTP command in defined intervals (e.g. the NOOP command). So you should implement something similar in your client.
29 Sep 2012 by amir tarek
i have a server of windows server 2003 and its IP on my local network is 192.168.1.220 this server has SOL server 2005 express edition installed with user name sa and password amirthis SQL server has a database called amir i want to connect to it from a Linux client on the same...
27 Jun 2011 by spydeehunk
Hi i have .NET webservice. i want to consume it from qt client. i know how to consume web service in .net but this is my first application in qt from which i want to consume .NET web service please help me out with some step by step code to consume web service
27 Jun 2011 by Kiran Sonawane
Your best bet is probably integrating gSOAP into your Qt application. (Make sure it's Licensing terms are ok for you.)A good run-down of how to do the integration is GSoap: SAOP and XML Web services for Qt apps (includes a sample .zip file). That doesn't require a specific version of Qt...
8 Jan 2014 by sarah john
Hi,Myself a begineer in QT programming. I captured several images periodically (JPG) from a qt application running on my pc.I need to transfer all the images to a qt aplication to another pc using qtcp sockets while the application is running.How to write the server to receive the images...
10 Sep 2019 by Sukerbek
I have taken a geotiff image from MODIS and i want to get a pixel (x,y) from that source image based on the longitude and latitude. I need a formula that how to calculate this without projection, any help would be appriciate.What I have tried:math - Convert longitude and latitude...
16 Nov 2016 by Jochen Arndt
You need the image dimension in pixels (width and height), a lat/lon reference point at a specified pixel position (e.g. lat0 and lon0 at x = y = 0), and the lat/lon degress covered by the image (e.g. by having another reference point at max. x and y).First step is calculating the scaling...
6 Jan 2018 by Member 13610443
I have DDS textures (DXT1, DXT3, DXT5) in a memory buffer. I want to convert these to QImages. The textures are in main memory not in the graphics card memory. I have searched Qt's documentation extensively and believe this can't be done with one simple function. It can be done by writing the...
27 Feb 2018 by Sukerbek
Hello everyone, how can i get the x, y based on longitude and latitude? Lets say i have geostationary image data ( float* data = new float[ 2750* 2750] ) and i want to extract the some are of my data. What I have tried: In order to do this i am using the Proj4 library. double dCenterLon = 80;...
25 Feb 2018 by RDBurmon
longitude and latitude are global numbers , to plot your place mark on map so those can't be converted to X and Y how can we? Image is small substance whereas Long / Lat are global number on map (world map) by the way here are few links about library you are using - proj.4 — proj.4 4.9.3...
8 May 2014 by ajapcooo
i have static library created by x86 .so i want to convert it to arm ?
8 May 2014 by OriginalGriff
Recompile the original source with an ARM compiler: you can't convert X86 machine code (which is what the library will contain) to ARM machine code - they are totally different processors and indeed types of processor. X68 is CISC, ARM is RISC (according to the manufacturer anyway: I disagree).
6 Jan 2020 by The Ænema
This article will teach you how to create an amazing, clean and smooth WPF/Winform UI for your native application without using any complex, unsafe, ActiveXish methods, etc.
17 May 2012 by Arun Kumar K S
How i can create .bundle extension file using Qt creator example(Myplug.bundle). I am in a work to create a plugin to already existing application that applications plugins are in bundle format. i found some sample code in Xcode to create bundle .How I can create such a project using QtCreator
17 May 2012 by Volynsky Alex
Before we can use custom widgets in Qt Designer, we must make Qt Designer aware of them. There are two techniques for doing this: the "promotion" approach and the plugin approach.Promotion approachThe promotion approach is the quickest and easiest. It consists of choosing a built-in Qt...
15 Jul 2010 by bonzaiholding
Hi,I want to create Web Service in WCF .net C#. The client that will connect my server have QT framework on Linux.Which kind of binding i should use in my WCF endpoint to support clients for that system?(I need also to let the user to register to events in my system. For example by...
15 Jul 2010 by #realJSOP
It's really not that hard to use google ("wcf web service linux client"). Here's one of the 210,000 hits returned:http://coab.wordpress.com/2009/10/15/calling-wcf-services-from-a-linux-c-client-using-gsoap/[^]