Qt Stock Widget - Customizable Watchlist with Drag-and-Drop and Context Menu
Introduction
This article continues from our previous work on stock search functionality. Here we will explore how to implement a customizable watchlist for stocks, featuring drag-and-drop reordering and right-click context menus.
Note: This implementation does not include styling. For visual enhancements, CSS styles can be easily added.
The wa ...
Posted on Sun, 21 Jun 2026 16:39:19 +0000 by kamasheto
Essential QWidget Properties and Controls for Qt C++ Development
Common Controls and Properties
Property
Description
enabled
Controls whether the widget is interactive. True means the widget is active, false disables user interaction.
geometry
Position and dimensions, comprising x, y, width, and height. Coordinates are relative to the parent element.
windowTitle
Sets the widget's title bar text.
...
Posted on Thu, 18 Jun 2026 17:13:43 +0000 by majik-sheff
Understanding Qt's Signal and Slot Mechanism
Qt abstracts the underlying operating system’s event handling into a consistent, cross-platform mesaging model based on signals and slots. This mechanism enables communication between objects without requiring them to be tightly coupled.
A signal is emitted when a particular event occurs—such as a button click—while a slot is a function that re ...
Posted on Fri, 12 Jun 2026 18:19:10 +0000 by acac
Integrating VTK with Qt Widgets in Visual Studio 2022
Prerequisites
Before starting, ensure you have:
A compiled VTK library (built with CMake from VTK-9.3.0 or later)
Qt 6.x installed on your system
Qt Visual Studio Tools extension installed in Visual Studio 2022
Creating a Qt Widgets Application
Open Visual Studio 2022 and create a new project. Select Qt Widgets Application from the Qt project ...
Posted on Wed, 10 Jun 2026 18:38:27 +0000 by HektoR
Building a Custom Qt Date Range Selector Widget
Overview
This article details the implementation of a custom date range picker widget using Qt and C++. Unlike standard widgets like QDateEdit, this control allows users to select a specific time interval (start date to end date) through a custom-painted popup interface. The implementation relies heavily on QPainter for rendering, providing hig ...
Posted on Mon, 08 Jun 2026 17:25:50 +0000 by steve012345
Text Editing Components in Qt Framework
Overview of Qt Text Editing WidgetsQt provides three primary text editing components, each designed for specific use cases:QLineEdit – A single-line text input widget suitable for forms, search boxes, and simple data entry.QTextEdit – A multi-line rich text editor supporting formatted text, images, tables, and other embedded content.QPlainTextE ...
Posted on Sat, 06 Jun 2026 17:45:44 +0000 by fourlincoln10
Qt QObject Class: Complete Technical Reference
The QObject class serves as the foundation for all Qt widgets and core components. This class provides the essential infrastructure for Qt's signal-slot mechanism, event processing, property system, and object hierarchy management.
Header and Build Configuration
#include <QObject>
// In .pro file:
QT += core
Core Features
Signal-Slot Me ...
Posted on Fri, 05 Jun 2026 16:09:00 +0000 by oaf357
Understanding Qt's Rendering Architecture and OpenGL Integration
The Graphics Stack and Windowing Systems
When exploring options for high-performance 2D rendering, specifically after evaluating various game engines, developers often return to Qt. While engines like Cocos2d-x are popular, Qt offers a robust, mature ecosystem for graphics. To leverage Qt's rendering capabilities effectively—specifically for ha ...
Posted on Thu, 04 Jun 2026 18:08:13 +0000 by alvinkoh
Stacked Layout and Timer Usage in Qt
Stacked Layout Manager
The stacked layout manager (QStackedLayout) organizes interface elements in a stack-like manner:
All widgets are managed along the vertical axis perpendicular to the screen
Only one widget is visible at any given time
The topmost widget in the stack is displayed to the user
Key Characteristics
Each widget maintains uni ...
Posted on Wed, 03 Jun 2026 17:38:00 +0000 by salami1_1
Advanced Layout Management with QGridLayout and Stretch Factors
Layout managres in Qt provide mechanisms to control how widgets resize and reposition when their container changes size. A key concept in this behavior is the stretch factor, which defines the relative proportion by which widgets grow or shrink.
Understanding Stretch Factors
By default, widgets managed by a layout expand equally when space bec ...
Posted on Wed, 03 Jun 2026 17:04:00 +0000 by SlyOne