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
intercept another object. The event filter is implemented in this way: There is a member variable of type qobjectlist in the base class for all QT objects: Qobject, with the name Eventfilters, when one qobjec (Qobja) to another qobject (QOBJB)After the event filter is installed, QOBJB will save the Qobja pointer in Eventfilters.Before QOBJB handles an event, the Eventfilters list is checked first, and if not NULL, the EventFilter () function of the o
qtopia4.
Compile qtopia4:
To compile qtopia4, you must specify the path of the Cross-compiler. If the environment variable has been set during tslib compilation, you do not need to set it again. Run the Export command before compiling, check whether the following environment variables are available.
Export Path =/usr/local/ARM/arm-linux-gcc-3.4.5/bin: $ pathExport toolchain =/usr/local/ARM/arm-linux-gcc-3.4.5Export tb_cc_prefix = arm-Linux-Export pkg_config_prefix = $ toolchain/ARM-Linux
When c
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
Linux qt OpenCV installation Configuration (detailed edition)
Directory
Linux qt OpenCV installation configuration details directory Linux installation configuration 1 download system mirroring 2 system Partition 3 make U disk boot Disk 4 installation System 5 EASYBCD repair system boot qt installation configuration 1 Insta
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
opensource'sCode. When downloading, I downloaded the EXE format, which is more convenient for installation. I have not tried the ZIP format for the moment. I will try again later.
Another required software is mingw. According to the information found on the Internet, there is an integrated development environment called Dev-C ++ that comes with the mingw editor, and it is said that it is better to edit the code. But I am a newbie. Well, I won't do it first ~
Mingw can be downloaded here:
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
the compilation parameters in qt4.7.0If you want qt4.7.0 to use directfb, add the Configuration Parameter./Configure-plugin-GFX-directfb./Configure-QT-GFX-directfbThese two configuration parameters are optional.(2) Modify qmake. confNote that you should choose based on your target platform. For example, if you are targeting arm-Linux, then qmake. conf should be modified in the QT source code directory.$ Qt
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.