CN107291340B - Method for realizing interface effect, computing equipment and storage medium - Google Patents

Method for realizing interface effect, computing equipment and storage medium Download PDF

Info

Publication number
CN107291340B
CN107291340B CN201710445123.XA CN201710445123A CN107291340B CN 107291340 B CN107291340 B CN 107291340B CN 201710445123 A CN201710445123 A CN 201710445123A CN 107291340 B CN107291340 B CN 107291340B
Authority
CN
China
Prior art keywords
control
qpushbutton
qlabel
interface
qgroupbox
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710445123.XA
Other languages
Chinese (zh)
Other versions
CN107291340A (en
Inventor
邓建茜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Pico Technology Co Ltd
Original Assignee
Beijing Pico Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Pico Technology Co Ltd filed Critical Beijing Pico Technology Co Ltd
Priority to CN201710445123.XA priority Critical patent/CN107291340B/en
Publication of CN107291340A publication Critical patent/CN107291340A/en
Application granted granted Critical
Publication of CN107291340B publication Critical patent/CN107291340B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method for realizing an interface effect, a computing device and a storage medium. The method comprises the following steps: in response to an item in the list of items on the interface being selected, generating a selection signal by a QPushbutton control associated with the selected item; and in response to the selection signal, setting a state of a QGroupbox control and/or a QLabel control associated with the selected item to "show", wherein the QGroupbox control is disposed around the QPushbutton control, and the QLabel control is disposed adjacent to the QPushbutton control. The invention also relates to a computing device and a storage medium. Through the embodiments of the invention, the interface effect can be simply and conveniently realized, so that the program framework is clearer and the functions are smoother.

Description

Method for realizing interface effect, computing equipment and storage medium
Technical Field
The invention relates to the technical field of interface implementation, in particular to a method, a computing device and a storage medium for realizing an interface effect based on a Qt custom control.
Background
With the development of VR (Virtual Reality) products, there are more and more kinds of VR devices. The user can access more VR video resources and game resources in the server through VR helper software on a PC side, a mobile device side or other terminals. The game resource usually has a plurality of posters, and generally, a poster list area is designed in the VR assistant software interface to display all posters of the game.
Disclosure of Invention
There is a need for techniques that can implement an interface effect in a VR helper software interface where items in a list of items are selected. Wherein the item may be a poster picture.
According to one aspect of the present invention, a method for realizing an interface effect based on a Qt custom control is provided, which includes:
in response to an item in the list of items on the interface being selected, generating a selection signal by a QPushbutton control associated with the selected item; and
setting, in response to the selection signal, a state of a QGroupbox control and/or a QLabel control associated with the selected item to "display";
wherein the QGroupbox control is disposed around the QPushbutton control, the QLabel control being disposed adjacent to the QPushbutton control.
In one embodiment, the state of the QGroupbox control and/or the QLabel control is set to "hidden" in the event that the QPushbutton control does not generate a selected signal.
In one embodiment, the QGroupbox control is located below the QPushbutton control, and the size of the QGroupbox control is larger than the size of the QPushbutton control.
In one embodiment, the method further comprises:
in response to the selection signal, displaying a magnified view of the selected item on the interface.
In one embodiment, displaying on the interface a magnified view of the selected item in response to the selection signal comprises: displaying an enlarged view of the selected item onto an interface in response to a clicked () signal of the QPushbutton control by associating a connect () function with the clicked () signal.
In one embodiment, the method further comprises:
setting a color of the QGroupbox control and/or the QLabel control to a color different from a background color of an interface in response to the selected signal.
In one embodiment, the QLabel control has a background picture of a particular shape, wherein the background picture of the particular shape is displayed on the interface in the "display" state of the QLabel control.
In one embodiment, the item is a picture, and the picture is set as a background picture of a QPushbutton control associated with the item.
In one embodiment, the QGroupbox control and/or the QLabel control are set in state by associating a connect () function with the clicked () signal of the QPushbutton control and utilizing a slot function.
In one embodiment, the interface effect is an interface effect of VR helper software.
According to another aspect of the present invention, there is provided a computing device comprising:
a processor;
a storage device; and
computer instructions stored on the storage means and executable by the processor, which when executed by the processor cause the computing device to perform the method as described above.
According to a further aspect of the invention, a storage medium is provided, on which a computer program is stored which is executable by a processor, the computer program, when being executed by the processor, implementing the method as described above.
The inventor of the present invention finds that there is no technology in the prior art that can appropriately display the interface effect of the selected items in the item list based on the Qt custom control. Therefore, the technical task to be achieved or the technical problems to be solved by the present invention are never thought or anticipated by those skilled in the art, and therefore the present invention is a new technical solution.
Through the embodiments of the interface effect realization method based on the Qt custom control, the interface effect of the selected item in the interface can be simply and conveniently realized. Wherein, according to one embodiment, the selected item may be displayed with an outer frame and/or a logo of a specific shape may be displayed over the selected item. According to another embodiment, an enlarged view of an item (e.g., poster) may also be displayed on the interface. The interface effect realized in this way makes the program frame clearer and the functions smoother.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a schematic flow chart diagram of a method for achieving an interface effect based on a Qt custom control in accordance with one embodiment of the present invention;
FIG. 2 is a diagram of a layout of a Qt control for implementing an interface effect, according to one embodiment of the invention;
FIG. 3 is a screen shot of an interface effect implemented by the interface effect implementation method according to one embodiment of the invention;
fig. 4 is a schematic block diagram of a hardware structure of a computing apparatus for implementing an interface effect implementation method according to embodiments of the present invention.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
Qt is a cross-platform C + + graphical user interface application development framework. In this context, QPushbutton, QGroupbox and QLabel are Qt controls. FIG. 1 is a schematic flow chart diagram illustrating one embodiment of a method for implementing an interface effect based on a Qt custom control in accordance with the present invention. In an embodiment of the invention, an interface effect shows a scenario in which an item in a list of items located on the interface is highlighted on the interface in response to the selected item being selected. In the embodiment shown in fig. 1, the method comprises:
step S101: in response to an item in the list of items on the interface being selected, generating a selection signal by a QPushbutton control associated with the selected item; and
step S102: in response to the selection signal, the state of the QGroupbox control and/or the QLabel control associated with the selected item is set to "display". Optionally, in step S102, an enlarged view of the selected item may also be displayed on the interface, for example, in an item display area above the item list, in response to the selection signal.
The QGroupbox control is arranged around the QPushbutton control, and the QLabel control is arranged adjacent to the QPushbutton control. In one example, the QGroupbox control may be located at a lower layer of the QPushbutton control, and the size of the QGroupbox control may be slightly larger than the QPushbutton control (e.g., the area of the QGroupbox is slightly larger than the area of the QPushbutton, and 3 more pixels are located above, below, to the left, and to the right of the QPushbutton), so that when the state of the QGroupbox control is "show", it is displayed on the interface as a border that appropriately surrounds the QPushbutton control. In one example, the QLabel control can have a particular shaped background picture (e.g., a green triangle shaped picture) that is displayed on the interface in the "display" state of the QLabel control.
The term "the QLabel control is disposed adjacent to the QPushbutton control" as used herein means that there may be any suitable distance between the QLabel control and the QPushbutton control, as long as the selected item can be identified while the QLabel control is displayed without causing a person to mistakenly assume that the other item is identified.
The method may further comprise: and in the case that the QPushbutton control does not generate the selected signal, setting the state of the QGroupbox control and/or the QLabel control to be hidden.
In one example, the state of the QGroupbox control and/or QLabel control may be set by associating the connect () function with the clicked () signal of the QPushbutton control and utilizing the slot function. Specifically, when an item in the list of items is selected, the associated QPushbutton control generates a clicked () signal as the selected signal, and since the connect () function is associated with this signal, the slot function can be utilized to set the state of the QGroupbox control and/or the QLabel control to "display".
Likewise, an enlarged view of the selected item may be displayed on the interface in response to the generated click () signal by associating the connect () function with the click () signal of the QPushbutton control.
In one example, the method may further comprise: in response to the selected signal, setting a color of the QGroupbox control to a color different from a background color of the interface, and/or setting the QLabel control to a color different from the background color of the interface and having a particular shape. Wherein, for the QGroupbox control, only the color of the frame can be set; for the QLabel control, it can be realized by setting the background picture to a picture with a color different from the background color of the interface and a specific shape. Thus, when an item is selected, the selected item is displayed on the interface as a border (corresponding to the QGroupbox control) having a color different from the interface background color and/or as a particular shape having a color different from the interface background color in its vicinity, thereby distinguishing the selected item from other items in the list. Optionally, the color of the border of the QGroupbox control can be set and/or the background picture of the QLabel control can be set when the layout interface is designed. For example, it can be set by the following code:
ui.lable->setStyleSheet("background-image:url(:/PicoHome/Skin/game_detail_poster_select.png)");
ui.groupBox->setStyleSheet("QGroupBox{border:3px solid#42d4c1}")
in the method described above, the project may be a picture, such as a poster, which may be set as a background picture of a QPushbutton control associated with the project.
An interface for realizing the interface effect as described above may be created in the following manner.
First, a custom control class is created in the Qt project. For example, the Qt project includes a command or a function menu for creating a custom control class, and the custom control class can be created by calling the command or the function menu.
The QWidget control is then added to the created custom control class. Wherein the QWIdget control defines the space of the created custom control class.
Then, the QPushbutton control and the QGroupbox control and/or the QLabel control are placed into the QWidget control.
A QPushbutton control is configured to be associated with a project in the project list, and the geometric parameters of the QPushbutton control are configured to be substantially the same as the geometric parameters of the project. In one example, when the item in the list is selected by the user on the interface, the button corresponding to the QPushbutton control is caused to be selected, resulting in a clicked () signal ("selected signal") for the QPushbutton control.
As used herein, "an item/poster located in a list is selected on the interface" means that a user clicks or strokes the item/poster on the interface using a mouse, finger, or other touch device or other input device. It will be appreciated that there are other scenarios in which "selection" is indicated in other ways by other means.
The QGroupbox control may be placed into the QWIdget control without placing the QLabel control, or the QLabel control may be placed into the QWIdget control without placing the QGroupbox control, or both.
In one example, the QPushbutton control, the QGroupbox control, and/or the QLabel control may be arranged in a QWidget control in a layout as shown in fig. 2. The QGroupbox control may be disposed around a QPushbutton control, and the QLabel control may be disposed adjacent to the QPushbutton control. The QGroupbox control is located at the lower layer of the QPushbutton control and the size of the QGroupbox control may be slightly larger than the QPushbutton control (for example, the area of the QGroupbox is slightly larger than the area of the QPushbutton, and 3 more pixels are respectively arranged above, below, on the left, and on the right), so that when the state of the QGroupbox control changes to "show" (show) in response to a selection signal of the QPushbutton, the QGroupbox control is displayed on the interface as a border of an item associated with the QPushbutton control to indicate that the item framed by the QGroupbox control is selected. The QLabel control may be configured to be associated with a background picture having a particular shape such that when the state of the QLabel control changes to "show" in response to a selection signal of QPushbutton, the QLabel control is displayed on the interface adjacent to the selected item as the background picture having the particular shape to indicate that its adjacent item is selected. The particular shape may be triangular, square, diamond, rectangular, circular, oval, or any other shape.
In the example shown in FIG. 2, the QLabel control is shown centered above the QPushbutton control. It will be appreciated that the QLabel control may also be located to the left or right of the QPushbutton control, or any suitable location below, to the left or to the right of the QPushbutton control. In one example, when a project display on the interface is located above the project list, the QLabel control can be disposed above the QPushbutton control, e.g., at a location between the project display and the project list; when the project display area is positioned below the project list, arranging the QLabel control below the QPushbutton control; when the project display area is located on the left/right side of the project list, then the QLabel control is placed on the left/right side of the QPushbutton control. In one example, the QLabel control is displayed as a triangle with the vertex of the triangle facing the item display area, the edge opposite the vertex immediately adjacent to the selected item in the list of items, and a magnified view of the selected item displayed in the item display area.
In one example, the QPushbutton control and the QGroupbox control and/or the QLabel control are configured such that:
in response to an item being selected, the state of the QGroupbox control and/or the QLabel control associated with the selected item changes to "display," at which time the QGroupbox control is displayed on the interface as a border around the selected item and/or the QLabel control is displayed on the interface as a particular shape located near (e.g., immediately above) the item to indicate that the border is framed and/or that items near the particular shape are selected.
In this example, in the case where QPushbutton does not generate a selected signal (i.e., its associated corresponding item is not selected), the state of the associated QGroupbox control and/or QLabel control is "hidden", and the QGroupbox control and/or QLabel control is not displayed on the interface at this time.
To further highlight the selected item on the interface, in one example, in response to the selection signal, the color displayed on the interface by the associated QGroupbox control and/or QLabel control is set to be different from the background color of the interface. For example, the interface is black and the QGroupbox control and/or the QLabel control are displayed green to display the selected item as having a green border and/or a particular shape nearby having a green color.
In one example, the QPushbutton control may also be configured such that: in response to the QPushbutton control selection signal, automatically loading the associated enlarged view of the corresponding item into an item display area of the interface. Thus, when an item in the item list is selected, an enlarged view of the selected item is displayed in the item display area on the interface, while the selected item is highlighted with a border and a particular shape in the item list area to clarify its correspondence with the enlarged view displayed in the item display area.
In the case where multiple items are included in the list of items, the above process of creating a Qt custom control class may be repeated for each item to establish a corresponding custom control class for each item and define it with a Qt control.
Herein, configuring the Qt controls such as QPushbutton, QGroupbox, and QLabel means that the Qt controls are further defined using instructions, commands, function menus, code written in a programming language, and the like. For example, a change in the state of a QGroupbox control and/or a QLabel control may be implemented by a connect () function in association with the clicked () signal of a QPushbutton control and using a slot function. For example, automatic loading of an enlarged view of a corresponding item may be handled in response to a button of the QPushbutton control being selected by associating a connect () function with a clicked () signal of the QPushbutton control.
In one example, the item is a poster, the list of items is a list comprising a plurality of poster tiles, and the item display area is a poster display area. It will be appreciated that the item may be any item other than a poster that is selectable from a list and for which an enlarged view is displayed in an item display area.
An example of code for configuring QPushbutton, QGroupbox and QLabel controls through the connect () function to achieve an interface effect of an item in a list of items being selected is given below by way of example, where the item is a poster:
Figure BDA0001319576220000081
Figure BDA0001319576220000091
in the example above, upon selection of a poster in the list of posters on the interface, the QPushButton associated with that poster generates a clicked () signal, thereby processing the selected state of the small poster within the slot function responsive to the QPushButton's clicked () signal: the state of qlab is set to show (display), the state of QGroupBox is also set to show (display), and the display program of the large poster area is processed. When the poster is not selected, setting an unselected state: the state of QLable is set to hide, and the state of QGroupBox is also set to hide. The presence or absence state of the poster is completed by setting the states of QLable and QGroupBox. Therefore, the realization of the interface effect based on the Qt self-defined control is completed. FIG. 3 shows an example screen shot of the interface effect so implemented.
In addition, a proper initialization function can be defined for the Qt self-defined control, so that the display size of the poster can be flexibly controlled through the transmission parameter during initialization, the design requirement is met, and the interface is more attractive.
The above embodiments of the method can be used for realizing the interface effect of VR helper software on a PC terminal, a mobile terminal or other terminals. It is understood that they may also be implemented by software interface effects for other fields.
The above method embodiments may be implemented on a computing device. In one embodiment, the computing device includes:
a processor;
a storage device; and
computer instructions stored on a storage device and executable by a processor, which when executed by the processor, cause a computing device to perform the method embodiments as described above.
Fig. 4 shows a hardware configuration composition schematic block diagram of such a computing device. As shown in fig. 4, the computing device 300 includes a processor 3010, a memory 3020, an interface device 3030, a communication device 3040, a display device 3050, an input device 3060, a speaker 3070, a microphone 3080, and the like.
Memory 3020 is used to store instructions that control processor 3010 to perform operations that result in the implementation of method embodiments that implement interface effects based on Qt custom controls as described above.
The processor 3010 may be, for example, a central processing unit CPU, a microprocessor MCU, or the like, or may be a distributed processing system. The memory 3020 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface device 3030 includes, for example, a USB interface, a headphone interface, and the like. The communication device 3040 can perform wired or wireless communication, for example. The display device 3050 is, for example, a liquid crystal display panel, a touch panel, or the like. The input device 3060 may include, for example, a touch screen, a keyboard, and the like. A user can input/output voice information through the speaker 3070 and the microphone 3080.
The computing device shown in FIG. 4 is illustrative only and is not intended to limit the invention, its application, or uses in any way. It will be appreciated by those skilled in the art that although a number of components are shown in fig. 4, the present invention may relate to only some of the components therein. Those skilled in the art can design instructions according to the disclosed aspects, and how the instructions control the operation of the processor is well known in the art, and therefore, will not be described in detail herein.
The above method embodiments may also be stored on a storage medium and distributed in the form of a computer program. Therefore, according to another aspect of the present invention, there is also provided a storage medium having stored thereon a computer program executable by a processor, the computer program implementing the method embodiments as described above when executed by the processor.
The storage medium may be any tangible device that can hold and store instructions for use by an instruction execution device. For example, it may be, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the storage medium include: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Storage media, as used herein, is not to be construed as a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
The computer programs/computer instructions described herein may be downloaded to the respective computing/processing devices from a computer-readable storage medium, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present invention may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present invention are implemented by personalizing an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of computer-readable program instructions, which can execute the computer-readable program instructions.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. It will be apparent to those skilled in the art that the above embodiments may be used alone or in combination with each other as desired. In addition, for the device embodiment, since it corresponds to the method embodiment, the description is relatively simple, and for relevant points, refer to the description of the corresponding parts of the method embodiment. The system embodiments described above are merely illustrative, in that modules illustrated as separate components may or may not be physically separate.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Although some specific embodiments of the present invention have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustrative purposes only and are not intended to limit the scope of the present invention. It will be appreciated by those skilled in the art that modifications may be made to the above embodiments without departing from the scope of the invention. The scope of the invention is defined by the appended claims.

Claims (9)

1. A method for realizing interface effect based on Qt custom control comprises the following steps:
in response to an item in the list of items on the interface being selected, generating a selection signal by a QPushbutton control associated with the selected item; and
setting, in response to the selection signal, a state of a QGroupbox control and/or a QLabel control associated with the selected item to "display";
the QGroupbox control is arranged around the QPushbutton control, the QLabel control is arranged adjacent to the QPushbutton control, the arrangement of the QLabel control adjacent to the QPushbutton control means that the QLabel control can identify the selected item without mistakenly identifying other items when being displayed, the QLabel control has a background picture with a specific shape, and the background picture with the specific shape is displayed on an interface in a display state of the QLabel control to indicate that the adjacent item is selected.
2. The method of claim 1, wherein the state of the QGroupbox control and/or the QLabel control is set to "hidden" if the QPushbutton control does not generate a selected signal.
3. The method of claim 1, wherein the QGroupbox control underlies the QPushbutton control and the size of the QGroupbox control is greater than the QPushbutton control.
4. The method of claim 1, further comprising:
displaying, in response to the selection signal, a magnified view of the selected item on the interface,
wherein displaying on the interface an enlarged view of the selected item in response to the selection signal comprises: displaying an enlarged view of the selected item onto an interface in response to a clicked () signal of the QPushbutton control by associating a connect () function with the clicked () signal.
5. The method of claim 1, further comprising:
setting a color of the QGroupbox control and/or the QLabel control to a color different from a background color of an interface in response to the selected signal.
6. The method according to any one of claims 1-5, wherein the project is a picture, and the picture is set as a background picture of a QPushbutton control associated with the project.
7. The method of any of claims 1-5, wherein the state of the QGroupbox control and/or the QLabel control is set by associating a connect () function with the clicked () signal of the QPushbutton control and utilizing a slot function.
8. A computing device, comprising:
a processor;
a storage device; and
computer instructions stored on the storage and executable by the processor, which when executed by the processor cause the computing device to perform the method of any of claims 1-7.
9. A storage medium having stored thereon a computer program executable by a processor, the computer program, when executed by the processor, implementing the method according to any one of claims 1-7.
CN201710445123.XA 2017-06-12 2017-06-12 Method for realizing interface effect, computing equipment and storage medium Active CN107291340B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710445123.XA CN107291340B (en) 2017-06-12 2017-06-12 Method for realizing interface effect, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710445123.XA CN107291340B (en) 2017-06-12 2017-06-12 Method for realizing interface effect, computing equipment and storage medium

Publications (2)

Publication Number Publication Date
CN107291340A CN107291340A (en) 2017-10-24
CN107291340B true CN107291340B (en) 2020-10-09

Family

ID=60096548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710445123.XA Active CN107291340B (en) 2017-06-12 2017-06-12 Method for realizing interface effect, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN107291340B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984239B (en) * 2018-05-29 2021-07-20 北京五八信息技术有限公司 Processing method, device and equipment for selecting control and storage medium
CN111367597A (en) * 2018-12-26 2020-07-03 杭州海康威视系统技术有限公司 Color switching method and device and electronic equipment
CN112732258A (en) * 2021-01-11 2021-04-30 中国船舶重工集团公司第七0七研究所 Dynamic switch button software implementation method based on state machine
CN113723614A (en) * 2021-09-01 2021-11-30 北京百度网讯科技有限公司 Method, apparatus, device and medium for assisting in designing quantum circuits

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102483760A (en) * 2009-08-31 2012-05-30 微软公司 Visual search and three-dimensional results
CN102981861A (en) * 2012-12-12 2013-03-20 上海航天测控通信研究所 Using method of custom control based on Qt
CN106815018A (en) * 2016-12-27 2017-06-09 国电南瑞科技股份有限公司 Tramcar comprehensive operation dispatches the integral design method of system man-machine interface

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7934156B2 (en) * 2006-09-06 2011-04-26 Apple Inc. Deletion gestures on a portable multifunction device
US10310707B2 (en) * 2016-05-31 2019-06-04 Kyocera Document Solutions Inc. Remote-device-management user interface enabling automatic carryover of selected maintenance-process groups in transitioning among hierachized device groups

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102483760A (en) * 2009-08-31 2012-05-30 微软公司 Visual search and three-dimensional results
CN102981861A (en) * 2012-12-12 2013-03-20 上海航天测控通信研究所 Using method of custom control based on Qt
CN106815018A (en) * 2016-12-27 2017-06-09 国电南瑞科技股份有限公司 Tramcar comprehensive operation dispatches the integral design method of system man-machine interface

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"QLabel,QPushButton,QLineEdit,QComboBox,QCheckBox,QRadioButton,QTextEdit,QTextBrower,QGroupBox,QSL";toto1297488504;《http://blog.csdn.net/tototuzuoquan/article/details/41897973》;20141212;第1-4页 *

Also Published As

Publication number Publication date
CN107291340A (en) 2017-10-24

Similar Documents

Publication Publication Date Title
CN107291340B (en) Method for realizing interface effect, computing equipment and storage medium
KR102463304B1 (en) Video processing method and device, electronic device, computer-readable storage medium and computer program
CN107168780B (en) Virtual reality scene loading method and equipment and virtual reality equipment
CN104571874B (en) The method and apparatus of switching at runtime keyboard background
WO2016045523A1 (en) Display method and device for interface contents of mobile terminal and terminal
CN106658139B (en) Focus control method and device
US10452231B2 (en) Usability improvements for visual interfaces
US20160077726A1 (en) User interface based interaction method and related apparatus
CN113031946B (en) Method and device for rendering page component
US11169701B2 (en) Display of a virtual keyboard on a supplemental physical display plane surrounding a primary physical display plane on a wearable mobile device
US20160216929A1 (en) Processing application interface
US20220050562A1 (en) Methods and apparatuses for generating a hosted application
CN105094331A (en) Information processing method and electronic device
CN110333859B (en) Page creation method, page creation device, electronic device and computer readable storage medium
KR20150095523A (en) Electronic apparatus and method for extracting color in electronic apparatus
CN115599206A (en) Display control method, display control device, head-mounted display equipment and medium
US9600161B2 (en) Generating and displaying a specific area
CN114629800A (en) Visual generation method, device, terminal and storage medium for industrial control network target range
CN109600558B (en) Method and apparatus for generating information
CN109062645B (en) Method and apparatus for processing information for terminal
CN113448635A (en) Configuration method and device of head-mounted display equipment and head-mounted display equipment
CN112269642A (en) Application program control method, device, equipment and storage medium based on Windows system
CN110888787A (en) Data monitoring method, device and system
CN112035771A (en) Web-based camera data drawing method and device and electronic equipment
CN104850298A (en) Information processing method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant