Alright, I found the reason. qwidget: Create () clears the QT: wa_quitonclose attribute for anything but QT: window, QT: widget or QT: dialog. the workaround is to call for example qwidget: Show () first, and set the attribute by hand afterwards:Qt code:
Switch view # include
Sometimes it is necessary to obtain the intersection between a straight line and various graphics, including polygon and various QT graphic boxes.
For example, to keep the connection line on the side of a polygon and point to the center of the polygon, we need to obtain the intersection of the AB and polygon of the line.
1. intersection of a polygon (qgraphicspolympus gonitem) and a straight line (qlinef)
1234567891011121314151617
with templates. For example, we can have object properties. And we can have overloaded signals and slots, which feels natural when programming in a language where overloads is a key Concept. Our signals add zero bytes to the size of a class instance, which means we can add new signals without breaking binary com Patibility.Another benefit is so we can explore an object ' s signals and slots at runtime. We can establish connections using Type-safe call-by-name, without have to know the exact typ
QT Development (50)--the basis ofQT serial ProgrammingFirst,QtserialportIntroduction1, serial Communication Foundation at present, the most widely used serial port is The DB9 interface is suitable for communication at a relatively close distance. Generally less than 10 meters. The DB9 interface has 9 pins.The main parameters of serial communication are as follows:A, baud rate: measure the speed of communication parameters, indicating the number of bit
There was a problem writing the QT program:Qt comes with a single pop-up function,So you need to use the UI to design the content of the pop-up window, so that the pop-up windows and ordinary windows, but the problem is that the pop-up window display stepfather windows or activities.Search the Internet for a long time to find a solution:Qt::windowflags flags = Qt::D ialog;Mycom->setwindowflags (flags);Mycom
The Patchelf tool can modify the dependent library location of the compiled run program and specify the library linkerPatchelf--set-rpathPatchelf--set-interpreterWith this tool HTTPS://GITHUB.COM/PROBONOPD/LINUXDEPLOYQT if you do not compile, you can also download the ready-madeHttps://github.com/probonopd/linuxdeployqt/releasesRun./linuxdeployqt-2-x86_64.appimage shanbaydict and for success, the generated Lib directory has very few so files.Run./linuxdeployqt-2-x86_64.appimage Shanbaydict-appim
Qt implements the dynamic desktop background snowflake program, qt snowflake
I once received a gift, a snowflake program, and thought it was amazing. Through the previous articles, we have mastered some Paster skills, now you can implement it on your own (of course, you must first have the basic knowledge of qt signal and slot). Let's first look at the effect and
color: Qpalette: setcolor () sets the color for a colorole.Qpalette: setbrush ()Set the color for a colorole,You can set images. Note: When setting the background color,Call setautofillbackground (true) first ). Button use palette // Use palette ---------- on the button to set the button font UI-> toolbt-> setfont (qfont ("", 20, qfont: bold )); UI-> toolbt-> setautoraise (true); UI-> toolbt-> setautofillbackground (true); qpalette PL = UI-> toolbt-> palette (); // set the button text col
@ Import URL (http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx? Type‑stylefile=syntaxhighlighter.css); @ import URL (/CSS/cuteeditor.css );It is not difficult to implement this function in QT: 1. Using Photoshop to make irregular window effects, or using the anti-sawtooth function to draw the background on the widget is a normal drawing. 2. Create a widget in the main window and set its
window->setWindowFlags(
The following is our progress, starting with the Qt Standard dialog box. The so-called Standard dialog box, in fact, is a number of QT built-in dialog boxes, such as file selection, color selection and so on. Today I'd first introduce Qfiledialog.
Qfiledialog is a dialog box for file opening and saving in Qt, which is equivalent to the JFileChooser in swing. Bel
1. On the official website (http://qt.nokia.com/downloads/downloads) Download the SDK, the default recommended online installation.
Download get file Qt_sdk_lin32_online_v1_1_3_en.run
Run directly (./file name)
Select the installation directory, where I select My home directory (/home/username)
2. After installation, there is a qtsdk folder in the home directory, the folder is a QT library 4.7.4, Qt Creato
Http://hi.baidu.com/proudboy_linux/blog/item/58d4daeeba84e51ffdfa3cd8.html
Build an embedded QT Development Environment
Http://hi.baidu.com/proudboy_linux/blog/item/58d4daeeba84e51ffdfa3cd8.html
Build an embedded QT Development Environment
I have read a lot of posts about building the QT development platform on the Internet, but I found that the above posts are
I'm bored recently. I want to learn how to use mobile phone software. I don't need to say much about Android. Many people are using it. There are also a lot of Android Program Development tutorials. I have learned a lot about Java. Unfortunately, I am still using the mobile phone of the Symbian system.
Therefore, I decided to build my own Symbian mobile phone software.
Qt Nokia-related information, Baidu. I won't say much here.
Go straight to the t
Recently, the TIFF format was only available in the project. I checked on the document: "tiff is an image file format. This image format is complex, stores a large amount of content, occupies a large storage space, and is three times the size of GIF images, it is 10 times the corresponding JPEG image ". See its definition: The label Image File Format (Tagged Image File Format, abbreviated as TIFF) is a file format mainly used to store images including photos and art maps.
Label Image File Form
Qt implements cascading deletion of sqlite3 and qt implements sqlite31. there are two required tables: the barcode table and the product details table. The rfid in the barcode table is the rfid foreign key in the product table, you must delete the related entries in the product table to achieve cascading deletion of the bar code table. solve this problem by using the cascading deletion feature provided by s
C ++ memo-QT (4), Memo-qt
User Logon-creator Programming
Draw the following interface:
During compilation, the following header file ui_main1_1_h is automatically generated
/*************************************** **************************************** *
** Form generated from reading UI file 'mainwindow. Ui'
**
** Created by: Qt User Interface Compilervers
Today, we can use some QT tools to write command line programs. We can see a more general usage of QT.The content is very simple and the current date is output.The qdate class is used first. You can use the static method currentdate of the qdate class to obtain the current date.Second, the cout in the standard library cannot output the qstring type, so the qtextstream class is used for output. Common variables such as Endl and flush have been defined
Qt Event Filter and Qt Event Filter
Sometimes, we need to restrict the functions of a widget. In this case, we can derive a new class and restrict the original functions in this new class. In some simple cases, this is not necessary. The event filtering function provided by Qt can also be used.
Event Filtering intercepts all messages sent to an object in advance,
QT network programming: instant communication in the C/S architecture under Tcp, and qt Network Programming
First, write a client, which is simple, can join the chat, and join the server interface.
#ifndef TCPCLIENT_H#define TCPCLIENT_H#include
There is a button to add to the server and a button to send messages. In the header file, two functions are defined first.
# Include "tcpclient. h "# include
Imple
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.