This experience is mainly the author of the development of the QT program in the development of the problems encountered, and now share to everyone, mainly in QT embedded like resource files.Please leave a message if you have any questions.Tools/Materials
Qt Designer
Qt Open Source 4.8.5
Method/Step
A small record of qt Learning (2), qt Learning Record
Well... This time I received a ticket
A graphical interface is required. You can just consolidate and learn QT. I took it without hesitation.
The following issues are recorded:1. QWidget and QDialog
The slot functions in QDialog include accept () and reject (), which can be directly used.
In addition, the QDia
QT adds the program icon and window icon, and qt adds the icon windowProgram icon material preparation
Icon file: *. ico file, which is stored in the same directory as the source file, for example, "myapp. ico"
Write icon
Write "RC_ICONS = *. ico" into an independent row in the *. pro file, such as RC_ICONS = "myapp. ico"
Generate a program
Run the program to view the software with icons under the
Tags: ODBC change batch rollback CString set password SQL command moveqt-win-commercial-src-4.3.1, qt-x11-commercial-src-4.3.1Microsoft Visual C + + 6.0, KDevelop 3.5.0Windows Xp, Solaris 10, Fedora 8SQL Server, Oracle 10g Client , driver compilationThere are two database drivers to be mentioned here, namely ODBC and OCI The ODBC driver is compiled in the Windows operating system:Execute the following command to generate Qsqlodbc4.dll under the%qtdir
Okay. Now we are working.
Open the QT creator tool and select "file" and "new file or project"
There are multiple types of projects and files. Here we are mobile development.
Select "mobile application" on the right of "QT Control Project"
Click "select" and the configuration will pop up, for example:
Enter the project name and file path, and click Next to select a device:
There is an introduction befor
This blog mainly records three aspects.
1. The configuration of QT Creator in Linux is based on the work of the previous two articles, and some details are configured.
2. Run the applets on the desktop and the Development Board respectively to verify the cross-platform features of QT.
3. Install the development environment in windows. This part is based on QT cre
Starting from a memory leak?Very simple entry procedure, you should be familiar with it ^_^#include In the context of the delete from Qt, we mentioned that the program has a memory leak (the representation is that the destructor is not called), and there are three workarounds:
Assigning a Label object to a stack instead of a heap
Set tag bit qt::wa_deleteonclose for label
Call Delete yourse
Graph effects in Qt Quick-Gradient and quickgradientQt Quick provides three gradient graphs:
ConicalGradient, conical gradient
LinearGradient, linear gradient
RadialGradient, radial gradient
Effect
Is an example of my design:
Figure 1 gradient chart Effect
, The first behavior linear gradient, the second behavior conical gradient, the third behavior radial gradient.
The gradient element differs from other graphic effect elements in that the gradi
-fbdevConfiguration parameters are not described in detail here, because they are mainly used for Qt, rather than directly using directfb for UI development.# Make# Make installImport Environment Variables# Export directfb =/home/cnnbboy/directfb-armAfter the installation is complete, you can port it. To check whether direct is available, you can also compile directfb-ExampleFirst, clear the original environment variables and import new environment va
% slower, a colleague with 10G of memory made a memory disk to compile, but also fast 30%.If you are slower than this, check your code problems.2. "QT itself is compiling slowly," the saying is wrongQT itself is actually compiled not slow, slow is WebKit library and example program, if you do not change any option by default will compile all, WebKit itself is a dinosaur-level project, with too many generic technology, compile very slow. In addition,
using the AddWidget interface, adding a sub-layout using the Addlayout interface. This interface is not commonly used, and its usage principle is to add addwidget widgets and Addlayout layout to this variable.2) AddWidget (Qwidget *w) adds this widget to the specified layout, using the AddItem3) qsize closestacceptablesize (const qwidget * widget, const qsize size) [Static]Returns the size dimensions that meet all throttling policies to the widget, including Heightforwidth (), and as close to s
IfProgramFor example, if you need to load a large amount of data in advance, the program generally has a startup screen. In this way, the user can see that the program is being started rather than simply waiting for it. It also displays some useful information about the program, such as the Program Logo, function module, or product information.
In the QT application, you can use the qsplashscreen class to start the screen. The following is a simple
Qt Address Book (2) Add addresses, qt Address Book add addresses
In the last Qt Address Book (I) interface design, we mainly implemented the address book interface and used the layout manager to layout elements, it also explains the concepts of "subclass" and "ownership.
In this article, we will add three QPushButton buttons on the interface to save the Name and
Qt custom tag button and qt custom tag
When you get started with Qt, you will be surprised by its extremely convenient cross-platform approach and want to try Qt. Gradually, you will find that some of Qt's built-in controls cannot meet your own needs. At this time, we need to define our own controls. In general, there
I. Advantages of QT:
1. cross-platform2. the signal-slot mechanism is too elegant. Compared with MFC, its non-Form class also supports this mechanism. This designer's idea is admirable, and because its non-Form class also supports this mechanism, so many of its usage makes people feel bright, such as the use of qtimerevent, whether it is a form or not, can support timer, this is much more flexible than MFC3. Easy to use. Many mechanisms are similar to
Write static dynamic graph with QT, static dynamic histogram with qtRecently, several projects have been successively implemented, requiring the use of curves and bar charts to dynamically display data. Therefore, we have specially studied the qcustomplot open-source Drawing Library! As kimit in the garden said, although qcustomplot is a header file and implementation file, it is easy to use, but the code is much more messy than QWT, and the readabili
There are four ways to install QT on Fedora, and I have been patiently testing three methods for my first contact with Fedora.1, download the source code, manual compilation, select the path to install, please refer to the "FEDORA15 build QT development environment and compile Qt", Bo Master Pro test Pass.Advantages: You can choose the
The previous article I explained how to install the QT development environment, below we explain how to create a new project, the structure of the project consists of. Here we review some of the points of knowledge.
My development bad environment is Ubuntu16.04 TLS, we use the installation package screenshot below, one is Qt creater, one is qtlibary. Qtcreater is an integrated development environment, we d
array of wchar_t to hold Unicode charactersSecond, the character, string in QTQt as a cross-platform framework, the design of the first consideration of the character of the problem;It encapsulates a qstring representing a string, which is a UTF-16 encoded class, and encapsulates a Qchar class that represents a wide character;Then there's the problem: the code in VS is GBKSo just assign the string to qstring as follows:QString str = "A section of Chinese"; Ui.lineedit->settext (str);Running out
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.