Click here to Skip to main content
15,881,172 members
Everything / QT Creator

QT Creator

QT-Creator

Great Reads

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
by Asif Bahrainwala
OpenGL Compute Shader
by AmirShrestha
This article demonstrates how to link a third party libraries (DCMTK) to Qt based project.
by Marco Bertschi
A short guide on how you can style and customize the appearance of you QML controls in a CSS-like way

Latest Articles

by Asif Bahrainwala
OpenGL Compute Shader
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.
by Nicolas Kogler
Extensible code editor with syntax highlighting, code completion and line numbering
by Mahmoud Samir Fayed
Simple database application for Desktop and Android written in the Ring Programming Language

All Articles

Sort by Score

QT Creator 

18 Oct 2014 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
29 Oct 2012 by OriginalGriff
The whole idea of DLL files is that you don't have to combine them together - they exist separately so they can be used by multiple applications without needing multiple copies.The only way to combine and EXE with the DLL files would be to include the source of the DLLs in the EXE source, and...
6 Feb 2013 by Matthew Faithfull
That depends what you're doing with C/C++ and how much experience you have.Qt is very very good for small to mid scale application development for Windows, Linux and Mac. If you want to step outside that you may be out of luck, check the latest Qt docs. Qt is also very large, at least as large...
24 Jul 2013 by Prasad Khandekar
Hello,Following code snippet which is based on one of sample database project provided with QT should get you started.QSqlQuery query;query.prepare("INSERT INTO t(user_name) VALUES(?)");query.addBindValue(strUserName);query.exec();You can find some really good examples in Qt...
19 Dec 2013 by CPallini
Form the documentation[^], it looks you should use:QProcess myProcess;myProcess.start("pcd_viewer", QStringList()
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[^].
15 Jan 2013 by Jochen Arndt
Just have a look at the usbutils[^] sources which contain the lsusb utility. It uses the libusb[^] package. See the libusb API[^] for the provided functions.
11 Jan 2014 by CPallini
You might use, for instance, Visual C++, either for creating a console application or a GUI one.A GUI application written using WINAPI would have a pretty small executable with minimal additional dependecies (see, for instance "Deployment in Visual C++"[^]).
10 Nov 2015 by Jochen Arndt
In this block you are creating a QFile object with the same name as an existing object:if (nflag!=0){ QFile mFile(LoggerFileName); mFile.open(QIODevice::WriteOnly|QIODevice::Text); nflag=0;}You are opening a file but the other mFile object is still in it's previous...
20 Jan 2016 by Jochen Arndt
See Data structures - C++ Tutorials[^] about structure type names and object names.In you case WorkerThreadStr is the type and workerthreadstr is an object (here a member of WorkerThreadClass).So you have to use the object name if you want to assign a value from a class function:void...
31 Dec 2016 by Dave Kreskowiak
There is no "best". It's a matter of preference. Try them both out and make your own decision.
22 Feb 2018 by Asif Bahrainwala
OpenGL Compute Shader
28 Nov 2018 by Rick York
This error is not unique to Qt or any other framework. It is a linkage error meaning the methods noted can not be found. Often you will think you have the method implemented for a class but your function signature differs from the header's definition. It appears that you need to correctly...
28 Nov 2018 by CPallini
As Rick stated, this is a common linker error about missing methods. Now, looking at your code, you defined onsecChanges, onminChanges and onhrsChange methods, but you are apparently calling (see the error messages) secChanges, minChanges and hrsChanges. Can you spot the name mismatches? You...
17 Feb 2021 by CPallini
The brackets force the .x evaluation to happen before the .toFixed(2) one. Note they are not needed because of the left-to-right associativity of the member access operator (.). See C++ Operator Precedence - cppreference.com[^].
2 Jul 2011 by Emilio Garavaglia
Learning Java from C++ is easy.Your problem will not be Java itself, but the library you will use for GUIs.And it is the same problem as learning the QT library.
5 Aug 2011 by Nagy Vilmos
You are converting the image to base64. You must either remove the conversion or convert it back at the other end.
17 Nov 2011 by StarDrago
If I understood You correctly You need to pack a few files to the single one. Try to do with BoxedApp Packer!
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.
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...
16 Jan 2013 by Jochen Arndt
You must link your program with the libusb library. Therefore, you have to add the libary name libusb to your project. How to do this depends on your development environment. With a simple Makefile, just add the name at the end of the linker call (many Makefiles use a LDLIBS variable that is...
6 Feb 2013 by Espen Harlinn
Let's not forget C++Builder XE3 [^]I like the IDE, and you'll find tons of free components at: Torry's Delphi Pages[^], as C++ builder is able to use, and compile, components written for Delphi (VCL).Best regardsEspen Harlinn
14 Feb 2013 by Abhishek Pant
have a look at these threads they may help youhttp://qt-project.org/forums/viewthread/14449[^]http://stackoverflow.com/questions/5064815/launching-new-form-by-a-button-click-in-qt-gui-application[^]
14 Feb 2013 by Mehdi Gholam
Ask your question of the original author on that articles forum (the bottom of the article page) for better help.
29 May 2013 by KarstenK
why dont yiu use google for that???http://qt-project.org/faq/answer/how_can_i_convert_a_qstring_to_char_and_vice_versa[^]
29 May 2013 by CPallini
Quote:QString myString to TCHAR wString ??QString has the toWCharArray[^] method.
25 Aug 2013 by KarstenK
If you only will target Windows you can use the MFC from Microsoft. If you want to be portable you better stick to QT.But most of all, I recommend you to try to write big portion (classes and files) in clean C/C++ language so they are out of any of these framework to be portable. For...
19 Dec 2013 by H.Brydon
It seems to me that you don't have an implementation that will satisfy:QProcess myProcess(commandAndParameters);ormyProcess.start();The APIs in question take different parameters from what you have provided...
11 Jan 2014 by Captain Price
Well, you have to program directly to the operating system's API. This API is system-specific. On windows it is the Windows API. The Windows API is written in pure C.A "Hello-World" of the Windows API (AKA, Win32 API)://"Hello-World" application#include LRESULT CALLBACK...
8 May 2014 by pitonyak
Let me restate a few things that I think that you said:1. You know how to write a "slot"2. You have an array of 20 buttons.I assume that you already know how to connect your buttons to your slot that lets you know that a button was clicked. I assume that your real problem is that you...
8 May 2014 by pitonyak
I use the following in my PRO filesQuote:QMAKE_CXXFLAGS += -std=c++0xDetermine which flags are required by your compiler (and it looks like your error message makes two suggestions).
29 Nov 2014 by Richard MacCutchan
First decide on the size of your grid and the distance between each gridline. For example a grid that is 100 units high could have a line each 10 units. So if the user is trying to poition an item you just need to calculate the nearest gridline to the current position and snap it to that point....
19 Dec 2014 by Jochen Arndt
Qt provides an IDE (Qt Creator) which is also available for Windows. The Windows version includes MinGW, a Windows port of the GNU compiler tool collection. There is also a Visual Studio add-in available.For download see the Qt download page[^].When you have installed Qt Creator and the...
11 Nov 2015 by Jochen Arndt
An incomplete example on how to store a timestamp based on the available code:int prevTime = 0;void someFunction(){ if (PCANReadS == PCAN_ERROR_OK) { int diffTime = 0; // If not first frame if (prevTime) difftime = timestamp.millis -...
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...
19 Jan 2016 by Jochen Arndt
The arguments are passed to the main function where argc specifies the number of arguments and argv is the list of arguments. The first argument argv[0] is the name of the command itself so that argc will be at least 1.These parameters are passed to the QCoreApplication constructor that...
25 Jan 2016 by Jochen Arndt
If the update should be initiated by another thread, you should create an event for that:// MyDialog.h// This must be unique for the application.#define UPDATE_COUNT_EV QEvent::Userclass UpdateCountEvent : public QEvent{public: UpdateCountEvent(int err, int warn, int v) : ...
1 Jan 2017 by VISWESWARAN1998
Well you have to decide it on your own, I'll explain the advantages and dis-advantages Qt :Advantages: 1. Qt has its own designer and designing a good GUI with the GUI designer available with Qt designer is fairly simple with the help of spacers, buttons, html editor etc., 2....
28 Nov 2018 by KarstenK
This kind of linker error are the result of missing implementation of these functions. Often is missing implementation, some typo or wrong scope (class or private) the reason. Goto to the place where the functions are implemented and fixit.
29 Nov 2018 by CPallini
I've just installed QTCreator (3.5.1, based on QT 5.5.1) on my Linux box. The program compiled and ran smoothly (buttons producing no effect, however). To make it work I had to: add a sleep call in the Mythread::run method. //... for (int i = 0;; i++) { sleep(1); QMutex mutex; ...
14 Nov 2020 by Rick York
Picture is a class and from what you posted it appears that it is not derived from anything. The GALLERYCORESHARED_EXPORT flag is a modifier defined as a macro. In user code that is going to be defined as __declspec(import) in the windows world...
17 Feb 2021 by OriginalGriff
The brackets are probably not needed, but it's possible there was once a cast that required them - they just ensure that the dereference happens before the call to toFixed which would happen anyway!
5 Jan 2023 by Member 8840306
I am new in QT using C++ 98.I am setting the stylesheet in QT from of 5 label and 5 button using this class function Code 1(working), void Display::setting_Style() { ...
5 Jan 2023 by Michael Haephrati
There are a few issues with the code you provided in Code 2: In the first loop, you are trying to access the widget member of the signalMapper object, but this object does not have a widget member. You need to use MyForm::getMyForm() to get a...
23 Nov 2023 by KarstenK
Sounds like you must configure the camera settings or output correct. Take a look at this camera example code.
29 Jul 2016 by mytempacc
Found this error while compiling my qt gsoap application error: redefinition of 'Namespace namespaces []error: 'Namespace namespaces [8]' previously defined heredon't know what this is???can anybody help me out??? plz.
28 Jun 2011 by ANJAN828
Hello,I am trying to create a automatic number dialing system, it will recognize the hand gesture (e.g. finger gestures for indicating numbers) and corresponding operation should be done by the system.I am searching for the algorithm except the comparison technique.any body can help...
29 Jun 2011 by YDaoust
You didn't specify what is your acquisition device (could be a Kinect).If I assume you can get a well contrasted image of the hand on a neutral background, you should be able to delineate the edge of the palm and fingers.Then by studying concavities of the outline and/or crossings with a...
2 Jul 2011 by Trevor Johansen
I am beginning a new project that requires a nicely refined user interface but also requires portability between Windows and Linux. I am unsure about which way to go about this though, my choices seem to be:Use c/c++ and a cross platform toolkit such as QT Benefits are I already use c/c++...
28 Jul 2011 by Gokulnath007
I have used the following code to connect to the mysql database, the connection succeeds, but nothing is happened in the database and also no table is created and the rows are not indeed updated. Kindly help me on this issue..QSqlDatabase db= QSqlDatabase::addDatabase("QODBC"); ...
28 Jul 2011 by Kim Togo
You have to tell QSqlQuery how to "talk" to the databasse.http://doc.qt.nokia.com/latest/qsqlquery.html#QSqlQuery-3[^]QSqlQuery query = db.exec("create table person (id int primary key, firstname varchar(20), lastname varchar(20))");query.exec("insert into person values(101, 'Danny',...
29 Jul 2011 by Gokulnath007
What are the dll's and lib files to be added for my application to run on the Non-Qt installed machine??QString host = QHostInfo::localHostName(); QHostInfo hostinfo = QHostInfo::fromName(host);; QString address = ""; if (!hostinfo.addresses().isEmpty()) { QList list...
31 Jul 2011 by Sergey Alexandrovich Kryukov
How can you ever expect using Qt on the machine where Qt is not installed by using any DLLs? Just be logical.—SA
3 Aug 2011 by Richard MacCutchan
You need to get copies of the Qt static libraries. However, if they do not exist then you cannot do it.
6 Oct 2011 by JonnyJP
In Visual Studio (C++ Express 2008) I can set pre-processor definitions by going to:Project Settings - C/C++ - Preprocessorand add them to Preprocessor definitions which I can then use in #ifdef statements in my code. This is useful to seperate out code for debug and release...
30 Oct 2011 by danger man 2011
Hi , i build my own database and i have draw a chart for my database , i add a widget it's QgraphicsView widget PyQt4 , i need now to show my chart on this widget how i can do something like this ??
30 Oct 2011 by danger man 2011
scane = QtGui.QGraphicsScene() pic = QtGui.QPixmap("testbar.png") scane.addPixmap(pic) self.graphicsView.setScene(scane) self.graphicsView.show()
14 Nov 2011 by Sergey Alexandrovich Kryukov
Look at the basic code samples here where readLine is used: http://lists.trolltech.com/qt-interest/2002-03/msg00576.html[^].In your case, you should keep the file opened. Read 100 lines each time you request to forward a page. Unfortunately, scrolling your view back would be more...
14 Nov 2011 by elgaabeb
Hi,You must create a class that inherits from QFile with methods : - OpenFile() - ReadNextHundred() - CloseFile().Then you connect ReadNextHundred() to the button "Next" Clicked Event.Once button Clicked you should clear Display widget and show next lines.I think that the example in...
17 Nov 2011 by elgaabeb
Hi,To do this you need to build your Qt version statically.This link would help you :how-to-statically-link-qt-4/[^]
27 Nov 2011 by Liam S. Crouch
http://doc.qt....
27 Nov 2011 by Sergey Alexandrovich Kryukov
I took a look at one of the include files to see what is included. Qt header files are included via angle-bracket form of #include directive, see, for example http://msdn.microsoft.com/en-us/library/36k2cdd4%28v=vs.80%29.aspx[^].My first guess is: you need to setup compiler options to use...
20 Dec 2011 by hilmisu
Hi everyone,I have not much experience in qt, I was developing a serial port terminal then i came acroos with thisexample code. it works perfect in windows, but i have to use it in linux. when i tried to build this code in linux i get this error (without quotes) "error: cannot find...
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...
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...
4 Apr 2012 by alizadeh91
I've found it!That's Not possible!! but it can be casted to QGraphicsObject
4 May 2012 by Arun Kumar K S
Hi,I am in a work to create a web browser,I modified the fancy browser source code, My problem is how to pop up print dialog to print my web page it s very urgent please help me...
4 May 2012 by Sandeep Mewara
it s very urgent please help me... Urgent for you, not for us. We help here voluntarily. is to show the save as dialog when we click on download buttonYou say, you modified the code and all. Whats the issue? What have you tried so far?Here is what is expected of enquirers:1. TRY...
8 May 2012 by #realJSOP
We're running QTCreator 2.4.10) Can anyone tell me where to find the list of components and their versions in 2.5?1) Can we update the compiler (GCC) and GDB without messing anything up?
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);
17 Jul 2012 by Arun Kumar K S
I am creating a simple Image Editing tool to draw a shape on image using Qt. I can load Image to QGraphicsView. I tried sub classing QGraphicsScene and override mouse press event. But don't know how to draw a line on the image where the mouse pressed.How to draw a line or any text on a...
25 Jul 2012 by kumari arpita
Hi, i m tried with Qmessagebox in my application to show some data and image in the middle of the device . but i m able to display text in my scren bt not in the middle.mQMessageBox noc;QString er=tr("When you want to start reading the holy book :\nAllah has asked us to begin the...
1 Aug 2012 by Arun Kumar K S
I created one application in Windows and Mac using Qt. It uses AVRDude(One cmmand line utility) utility to pass some instructions to the hardware device. I used AVRDUDE command line executable in windows to pass instructions.I placed the command line(AVRDUDE) utility in the working folder and...
2 Aug 2012 by Sergey Alexandrovich Kryukov
Using one application in another one is not a good idea. You create a separate process, but the processes are well isolated. This is usual thing in Unix, but mostly because Unix is very old, and yet, it mostly used in the console applications, which is less of a problem.As I can see, you use...
22 Oct 2012 by rpm3d
hi dearsi wanna make a client server program based c++ with qt between windows and linuxso i know qt can make execute in there and i use on windows in therebut i dont know what should i do when i finish program for linux...mean how expoort or...please give me advice on itthank you
22 Oct 2012 by Richard MacCutchan
but i dont know what should i do when i finish program for linux...mean how expoort or...What do you mean by export? If you want a version that runs on Linux then you need to build it on Linux to ensure that it works correctly.
28 Oct 2012 by rpm3d
hi every onein my windows i set up :qt-sdk-win-opensource-2010.05.exeand write a program...after that i wanna make statick build and compileso i changeC:\Qt\2010.05\qt\mkspecs\win32-g++\qmake.confthis line QMAKE_LFLAGS...to QMAKE_LFLAGS = -static -static-libgcc...
29 Oct 2012 by Stefan_Lang
There are two ways to use libraries in a C++ program (an exe):1. You dynamically link them: in this case you have header files defining the API, *.lib files defining the entry points, and *.dll files, with the implementation of the library. In this case you add the path of the header files...
5 Nov 2012 by rpm3d
hi every bodyi hope you be finei am working on a program depends on socket programmingthat is cross platformand this program send file between come computersso now i wanna encrypt my files and in destination decrypt that....i am blind about encrypt and decryptionscan you say me...
6 Nov 2012 by OriginalGriff
MD5 is not an encryption algorithm - it is a hashing algorithm. If you use it to "encrypt" your data, you will not be able to decrypt it as hashing algorithms are not reversible. (And MD5 is not recommended for new applications anyway, because it is considered "broken").You could use public...
6 Nov 2012 by CPallini
You may use, for instance AES. The C source code maybe found here: "Cryptography - 256 bit ciphers"[^] (I used it without problems).
6 Nov 2012 by Barakat S.
If this file or data is transferred via a network, I'd recommend using SSL, using OpenSSL witch is free and cross-platform library: SSL Programming Tutorial[^].Even though, you don't have to start form scratch. Since you use QT, use what it provides you Secure Networking with QtSSLSocket[^].
14 Nov 2012 by timesheet2010
Anyone can help out how to post new photos with Flickr API successfully with QT? I constructed the HTTP header and the Post body by myself, and call QNetworkManager::post() to post new photos to the server. But it failed all the time. It reported "Invalid auth token!". But my auth token are OK...
27 Nov 2012 by manoranjan
1) Yes you can2) You need to connect to VPS's public IP. Either you or the ISP needs to set up NAT (or port forwarding) to forward the server's packets to the client (ie. to the VPS's private IP).
8 Dec 2012 by rpm3d
hi everyonei ask this before but now my point is a little diffrentin qt i wanna send with a socket program some filesi wanna use public keys and private keys...but i dont know how this worknow i fount a sample for #include crypto(Q_UINT64_C(0x0c2ad4a4acb9f053));...
9 Dec 2012 by Zaf Khan
There is a detailed article which can be found here on this same websiteClassical Encryption Techniques[^]
15 Dec 2012 by rpm3d
hi every onei'll hope everything being oki have a valid ip on my laptop and in my laptop i have a local netrokhow can i write a program that i can access to this programthis is base on socketeverything is goodbut maybe i should to use of setup NAT with use of my programso now my...
17 Dec 2012 by michaelmel
You do NOT need to implement NAPT in your software at all, as it should all be done by the firewall (in your setup, the router).1) Learn about Windows Sockets (winsock), in particular pay attention to concept of source and destination addresses and port numbers.2) Write a program which...
20 Dec 2012 by CHill60
First thing that came up from a google search ...http://www.control.com/thread/1286361303[^]
20 Dec 2012 by Abhishek Pant
have look at thisProgrammable Logic Controller Editor[^]
20 Dec 2012 by IDENguyen
you can use linux open suse. It so good for you to compiler c, or c ++
14 Jan 2013 by Arun Kumar K S
I need to list existing USB hub and the devices connected in the hub.I can able to print the USB Hub and devices connected in hub from terminal using the commandslsusblsusb -v How I can do this programmatically. Is there any C++ classes available to use in my Qt application.
16 Jan 2013 by Arun Kumar K S
I am trying to create a USB device information application using Qt in ubuntu OS. when I try to create a sample application. It gives the following error main.o: In function `main':main.cpp:(.text.startup+0x36): undefined reference to `libusb_init'main.cpp:(.text.startup+0x52):...
25 Jan 2013 by Moi Moi Coso
Hi,I just need help with my project. I am using Qt creator for Mobile symbian OS.I just would like to know what is the best Insert Command to enable the user to save input data into SQLite.I have this code:void addtrnsc::on_pushButton_clicked(){ QSqlDatabase myDB =...
25 Jan 2013 by DinoRondelly
This will help with your insert statement,http://www.w3schools.com/sql/sql_insert.asp[^]INSERT INTO table_name (column1, column2, column3,...)VALUES (value1, value2, value3,...)
4 Feb 2013 by Albert Holguin
Your question is pretty vague... but I do know that the Qt examples are pretty decent (although their detailed documentation isn't very good).Start here: http://qt-project.org/wiki/QtWhitepaper[^]Familiarize yourself with the framework then start a simple Qt application.
6 Feb 2013 by hor_313
i am seeking for a good (best) IDE for c/c++ programming .i found Qt but i dont know is it the best choise or not?and i saw in its site , it have 2models for windows . 1- Qt 5.0.1 for Windows 32-bit (MinGW 4.7, 823 MB) 2-Qt 5.0.1 for Windows 32-bit (VS 2010, 481 MB) i dont know i...
14 Feb 2013 by vishnulalr
Im beginner in qt . please help me to find how can i go to another form in qt on a pushbutton clickin c# .net form2 yu=new form2();yu.show();how can i write it in qt
14 Feb 2013 by nguyentuanebook
I downloaded the code: MicroPhoneAudio.zip from address:http://www.codeproject.com/Articles/421287/Cross-Platform-Microphone-Audio-Processing-UtilityI run this code the error message: MyAudio: pcm_params.c:2359: sndrv_pcm_hw_params: Assertion `err >= 0' failed.The program has...