Respect Original Works and translations. For reprinting, please maintain the integrity of the article and provide the original author's address in the form of a hyperlink http://blog.csdn.net/changsheng230, so that you can easily ask and correct it.
Friends who are new to Qt may feel mysterious and unfamiliar with the various macros that need to be declared during Qt usage. This article will introduce seve
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
Let's use an example to explain the application of the stylesheet. This example is based on the QT Demo, more complex, there is a certain degree of difficulty, basically covers the previous chapters of the various skill points, mainly including:
How to customize the style sheet for QT
How to apply a style sheet in an application
How to set the style of an application without using a style sheet
How to use a
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
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
.
RadialGradient
RadialGradient is the most complex gradient element and has the following attributes:
Angle: Specifies the gradient relative to the centerRotation AngleNote: This is different from the angle attribute of ConicalGradient.
Cached, omitted
Gradient, omitted
HorizontalOffset, which belongs to the real type and has the same meaning as that of ConicalGradient.
VerticalOffset, similar to ConicalGradient's attribute of the same name
HorizontalRadius, real type, specifies the
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
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
to 1 when it appears, and the opacity changes from 1 to 0 when it disappears. Our example is this kind of effect. It can also take a value of imageparticle.none (no effect) or Imageparticle.scale (from 0 to 1 when it appears, shrinking from 1 to 0 when it disappears). If you want to get better entry and exit effects, you can use Sizetable and opacitytable.Imageparticle also has many properties that you can use to understand the Qt help.This is your t
In simple terms, LUA's dynamic features complement the functionality of C + +. Of course, it depends on how you use it.I often use QT, so I'm ready to combine QT with Lua. Imagine calling the following code in a LUA script:W = qwidget:new () w:show ()And then pop up a qwidget window, what a touching thing it is.OK, let's start configuring the environment below.1. Download Lua 5.1. The current version is 5.2
If you want to know about QT and VS2013 development environment, you can turn this page.Here the main sharing environment has been built successfully, in the construction of projects encountered error solution."1" Qt and VS2013 development environment construction times wrongThe error interface is as follows:Note: In the upper left corner of the dialog box, QT Vi
Introduction:
QCA: QT cryptographic architecture is a very good class library for encryption and decryption on the qt platform. However, there are still few documents and blogs about QCA in China, if you are not familiar with QT and Unix development, you may encounter some problems when using this open-source class library (as you know, there are still many probl
Qt Learning Path (45): One of the custom model 2010-01-17 23:50:05 Tags: c + + tutorial Learn qt Tutorial qt original works, allow reproduced, please be sure to use hyperlinks in the form of the original source of the article, author information and this statement. Otherwise
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.