Click here to Skip to main content
15,889,867 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 Title

QT Creator 

18 Feb 2013 by hor_313
hii have Qtcreator 2.6.2 in my computer but it designer tab is disabled . how can i activate that?
18 Feb 2013 by Sandeep Mewara
Sounds like a paid product where you don't have full access to the features. Googled it and here is the place you should be looking for your...
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.
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
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...
20 Jun 2016 by Member 12587659
I am working on Non Gui Application. I need to browse a datalog file (datalog.txt) from comand line. How I can browse file(datalog.txt) from computer drive without Gui?? I am using QT.What I have tried:I dont have any idea of command line. so any help would be appreciated
19 Jun 2016 by Leo Chapiro
What do you mean by "browse a datalog file"?If you just want to open a file dialog, try to use QFileDialog Class like this:fileName = QFileDialog::getOpenFileName(this, tr("Open Image"), "/home/jana", tr("Image Files (*.txt)"));
20 Jun 2016 by Jochen Arndt
Qt is a GUI framework. If you don't want a GUI, there is no need to use Qt. Then just use standard C and/or C++ library functions.It is not very clear what you want to achieve. Do you want to open a text file and print the content to the console or process it line by line?That is quite...
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...
3 Jun 2011 by RomitMewada
I am Developing a EPUB Reader which has functionality to read files & run music files in the background. I have to create an .mcx(music control file for XML) file in which it describes which music file goes with which paragraph.I want to read the music file for a particular chapter but now...
7 May 2014 by Prakash257
hi ,I have some controls in class B which is publically derived from QWidget. I want to call these controls in class A. I declare in header of class A as , private: B *obj_B;And in A.cpp, constructor I define obj_B = new B(this);It calls control of class B...
25 May 2014 by Prakash257
Hi to all,I solve this problem by myself. Steps to solve it are as:1> Declare a in header file of calling class. QVector " m_ptr; 2> In cpp file of calling class (in constructor or any function where u want to use) define ...
11 Feb 2016 by XamBEE
Hello CP members,Yes, I know that one cannot use GUI things from non-GUI threads. thats why i am trying to "do process" in worker thread(Non-GUI) than coming back to GUI thread(main thread) to display Graph. but getting following error.QObject: Cannot create children for a parent that is in...
11 Feb 2016 by Jochen Arndt
You can use an event as already suggested in my answer to your question update/change QListWidget item value[^]:In a header file included by MainWindow.cpp and AnalysisWorkerThread.cpp (value should be application wide unique):# define DISPLAY_GRAPH_EV (QEvent::User + 1)Handle custom...
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...
17 Jun 2015 by bhawin parkeria
I want to change the color of text to blue where ever i get the word "class" in qt edittext , but i cant find any way to do it , i am new in qt , can anyone please help me here is my code of file openvoid MainWindow::on_actionOpen_triggered(){ QString file =...
17 Jun 2015 by Jochen Arndt
This requires that the QTextEdit uses HTML text (also called RichText with Qt). When loading a plain text file you must convert it to HTML and apply the required formats (e.g. by replacing "class" with "class"). Then use setHtml() instead of setPlainText(). See...
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
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
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...
14 Jan 2016 by XamBEE
I need to execute my QT program from Window command line interface. What changes i need to do in Main() and how i can call this through command line??My program main function is..int main(int argc, char *argv[]){ QApplication a(argc, argv); MainWindow w; w.show(); ...
14 Jan 2016 by Jochen Arndt
You can start any Windows program from a command prompt. Just enter the complete path at the prompt and press the Return key. There must nothing be changed in the source code.
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 ++
5 May 2014 by Arun Kumar K S
I am trying to create an i2c communication in raspbery Pi(debian wheezy) using Qt creator with rpi-hw library. I successfully compiled and installed the rpi-hw library in my linux system. But when I try to include this in my Qt. Got the following...
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).
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();//...};
27 Jun 2016 by Kaushik_M
This article is more on handling the state transition of an app in iOS device
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...
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.
14 Feb 2013 by nguyentuanebook
Thank for your answer very much!
1 Dec 2015 by XamBEE
I am writing data from my board into txt file. on my main window i have two buttons "start" and "stop" when i click on start cursor becomes busy(hourglass). And i cant click on stop button anymore. any suggestion to come out of this problem ???
1 Dec 2015 by PJ Arends
Use a worker thread to transfer your data, or at least use PeekMessage to poll your message queue to see if there are any messages.
12 Nov 2015 by Ramiien
I need suggestions from experienced Developer colleagues. I need to analyses the data logger files (log.trc) and file size could be in Mbs. My platform is C++/QT.Is there any builtin feature of QT for this analysis??Any C++ LIBRARY for efficient data Analysis??OR any...
13 Nov 2015 by KarstenK
Most important is the work with the different message levels. Maybe you must write a logger which sorts the messages in that level order. It should be so hard to write a viewer with some filtering.Take a look at these projects QsLog and CuteLogger.
10 Dec 2015 by XamBEE
Hi,I am trying to get data(8 Bytes) in QChar than save it into QByteArray because later i want to use each byte separately in my function.QChar tempVar=*(QChar*) DeviceMsg.DATA; expected Bytes from DeviceMsg.DATA would be something like 00ff22ff55001188what i am looking for...
11 Dec 2015 by Jochen Arndt
This would not work as expected because your input is a string (your example "00ff22ff55001188") containing 16 characters (QChar). If you need the bytes represented by two characters, you must get a character pair and convert it to a byte or just convert the whole string to a 64-bit value and...
10 Dec 2012 by Arun Kumar K S
Hi, I am developing a Qt application for Linux Ubuntu OS using Qt creator. Now I need to deploy this on my client machine. My client system is not having any Qt framework installed. I need to include the necessary Qt libraries with my application. I used dynamic linking method for including Qt...
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.
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.
19 Dec 2015 by Afzaal Ahmad Zeeshan
This post discusses the Ubuntu SDK and Qt IDE used in Ubuntu SDK for developing different types of Ubuntu applications and software services.
24 Aug 2013 by SaurabSaini
Hello i want to build a sketchpad using c++,which requires a smarter GUI,i want to know how should i go about.Which will be better Visual C++ or QT.
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...
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++...
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.
27 Jun 2011 by ANJAN828
I’m trying to develop a code in Matlab and C++ to distinguish different moving objects. But I couldn’t get any concept...A moving object can be detected but how will I classify that as human, animal or vehicle?Thank you in advance.[edit]improved spelling and grammar and changed caps...
27 Jun 2011 by #realJSOP
You would probably have to identify some basic shapes - a human, a four-legged anmal, and a car/truck/motorcycle/bicycle/airplane/missile/godzilla, and then come up with some sort of matching algorythm that can determine what shape best matches the moving object.
27 Jun 2011 by Niklas L
AI solutions using neural networks is common for recognizing patterns within an image. Knowing what to search for is essential: pattern matching neural networks[^].
27 Jun 2011 by Guyverthree
I did a little bit of the theory in University.Basically you need to find the differences between two frames of the video. (this gives you the movement between the two frames)Secondly once you have the differences you can then do your pattern matching to try to see what has moved. (I.E....
27 Jun 2011 by TRK3
If you are serious about solving the problem of distinguishing between human, animal and vehicle, I would suggest you take a step back and consider adding additional sensors:Infrared / thermal sensor -- do some research into infrared sensors and see if there is one that can give you...
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...
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...
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[^].
29 Nov 2018 by UA12
I keep getting this error when I try running a code that I wrote in Qt. I have attached the link to the screenshot of the error. The screenshot of the error Link to the code repository: GitHub - UA12/Stopwatch[^] What I have tried: I have been trying to understand what the problem is but...
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...
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.
30 Nov 2018 by UA12
these are the errors. Quote: qt.network.ssl: QSslSocket: cannot call unresolved function SSLv23_client_method qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_new qt.network.ssl: QSslSocket: cannot call unresolved function SSL_library_init qt.network.ssl: QSslSocket: cannot...
20 Jan 2016 by XamBEE
Hi,I am trying to get STRUCT value in my .cpp file but dont know exactly how to do this because i am using this first time.here is the code how i am trying to do..in WorkerThreadClass.h fileclass WorkerThreadClass : public QObject{ Q_OBJECTpublic: explicit...
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...
12 May 2013 by lim317
Hi, basically I'm starting learning on how to writing c++ code using openCV to load an image in QT creator tool.for your information, I create a project called TestingOpenCV, with several .cpp and .hfile :- .h file:--- mainwindow.h--- testing.h- .cpp file--- main.cpp---...
27 Jan 2016 by XamBEE
In my application I am reading from the text file but i need to keep eye on the file pointer where I am reading or how much content of the file i already read. and where to start next. There are TWO situations where i need to do this.CASE 1:: While 2 system A and B are accessing the file F...
27 Jan 2016 by Jochen Arndt
Just track the file position in a variable. File I/O functions return the number of items that has been read or written.High level file I/O methods often provide functions that return the current position (e.g. ftell) than can be used too.Special care must be taken when files are...
25 Jun 2013 by Dilan Shaminda
Hi, i made a program which finds contours of a given binary image..it works fine when i used it in vs2010..it is a console project..Now i tried the same code in Qt(used QT add-in in vs2010) with an simple interface.But it gives an exception in findContours(Dialate, contours, hierarchy,...
26 Dec 2015 by JohnnyG62
I have a Dialog form with a part id,qty, & Price. I need to pass values for these from my main form to the dialog. I found a couple suggestions via google which I've tried. One way was to add getters & setters. I was able to set the values before dialog.exec but how do I get these values to...
28 Dec 2015 by Eftimoski Mende
The problem is that you are trying to show the values in the constructor. The constructor is called when the dialog object is created, before you call the getters and setters and the exec() function.When the dialog is displayed (with the exec function) the values should be on the form.
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):...
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...
2 Nov 2015 by Ramiien
when trying to access DLL functions in my C++/QT application.e.g result = CAN_Initialize(PCAN_USBBUS1, PCAN_BAUD_250K);it is giving me error The program has unexpectedly finished.C:\myDevelopment\build-PcanPortLinker-Desktop_Qt_5_5_0_MinGW_32bit-Debug\debug\PcanPortLinker.exe...
2 Nov 2015 by Richard MacCutchan
Please do not repost the same question more than once. I already answered this at linker crash in C++/QTwhile access DLL file[^].
14 Feb 2012 by hilmisu
I am developing a qt application in linux. I wanted to give linux commands to terminal. its okay i did that but i want to get terminal response to this command. For example,ls -aAs you know this command has listed the directories. I wanted to show this returned values in my application. Is...
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...
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[^]
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...
4 Mar 2013 by vishnulalr
please help me to find qt c++ code to find the traceroute of an ip. Im a c# developer and new to qt i have developed below code but its in c# please help to translate it in qt c++ public string Traceroute(string ipAddressOrHostName) { IPAddress ipAddress =...
5 Mar 2013 by Richard MacCutchan
Read some of these links[^] for useful information.
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...
13 Nov 2014 by Member 11091184
Hi All,I want to access a usb token for ssl certificate storing.How can i Access that usb token in QT.Please replay.
6 Apr 2020 by rpm3d
hi every bodyokthat is improvei have a exe program that use 4 dlland i wanna to bint this exe and dlls together...or combinenow is clear??
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...
29 Oct 2012 by Guirec
if all your dlls are .net assemblies then there is a simple alternative way Merging .NET assemblies using ILMerge[^]http://ilmergegui.codeplex.com/[^]
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...
17 Jul 2020 by Ultran Messiski
Just use a app virtualizer like Enigma Virtual Box (free) or BoxedAppPacker (not Free) in top of that if you have no issue with loading dlls and functions one by one manually you can do manual mapping.