• 2024-10-03WPF Datagrid display via DataGridTemplateColumn
    <DataGridTemplateColumnHeader="Image"><DataGridTemplateColumn.CellTemplate><DataTemplate><ImageSource="{BindingDataContext.ImgUrl,RelativeSource={RelativeSourceMode=F
  • 2024-09-30WPF Progrss bar stringformat {} {0}% IsDetermined
    //xaml<Windowx:Class="WpfApp425.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mi
  • 2024-09-28WPF ProgressBar show value
    //xaml<Windowx:Class="WpfApp424.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mi
  • 2024-09-27QT 获取视频帧Opencv获取清晰度
    先展示结果:1.获取摄像头的分辨率mResSize.clear();mResSize=camera_->supportedViewfinderResolutions();ui->comboBox_resulation->clear();inti=0;foreach(QSizemsize,mResSize){qDebug()<<msize;ui->comboBox_re
  • 2024-09-250924-25,QT的数据类型,实现一个井字棋和计算器(只输入)
    day-01#include"mainwindow.h"#include<stdio.h>#include<iostream>#include<QApplication>#include<QDebug>#include<QPoint>#include<QLine>intmain(intargc,char*argv[]){QApplicationa(argc,
  • 2024-09-23WPF window fill the full screen and overlap on the taskbar
    WindowState="Maximized"WindowStyle="None"   <Windowx:Class="WpfApp409.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsof
  • 2024-09-23带你0到1之QT编程:十八、最简单之TCP协议工作原理及实战编程
    此为QT编程的第十八谈!关注我,带你快速学习QT编程的学习路线!每一篇的技术点都是很很重要!很重要!很重要!但不冗余!我们通常采取总-分-总和生活化的讲解方式来阐述一个知识点!码农不易,各位学者学到东西请点赞支持支持!开始部分:总:此次实战主要是实现一个客户端,一个服务端,来了解TC
  • 2024-09-23WPF Control+C short cuts to close the window
    //xaml<Windowx:Class="WpfApp402.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mi
  • 2024-09-22QTableWidget用法总结
    QTableWidget用法总结直接上代码mainwindow.h#ifndefMAINWINDOW_H#defineMAINWINDOW_H#include<QMainWindow>#include<QDateTime>#include<QScrollBar>#include<QFile>#include<QIODevice>QT_BEGIN_NAMESPACEnamespaceUi{class
  • 2024-09-22WPF DataGrid RowDetailsTemplate RowDetailsVisibilityMode="VisibleWhenSelected"
    <Grid><DataGridItemsSource="{StaticResourcebooksData}"EnableColumnVirtualization="True"EnableRowVirtualization="True"RowDetailsVisibilityMode="VisibleWhen
  • 2024-09-22WPF datagrid ClipboardCopyMode="IncludeHeader"
    <DataGridItemsSource="{StaticResourcebooksData}"ClipboardCopyMode="IncludeHeader"/>       //xaml<Windowx:Class="WpfApp398.MainWindow"xmlns="http://schemas.microsoft.com/winfx/
  • 2024-09-21WPF ComboBox DataTemplate Image
    <ComboBoxItemsSource="{StaticResourcedataList}"SelectedIndex="0"VirtualizingPanel.IsContainerVirtualizable="True"VirtualizingPanel.IsVirtualizing="True"Vir
  • 2024-09-21WPF Combobox show Image and textblock via DataTemplate
    <ComboBoxGrid.Row="0"Grid.Column="0"SelectedIndex="0"ItemsSource="{StaticResourcebooksData}"FontSize="20"Foreground=&quo
  • 2024-09-20【qt】一个WPS项目了解qt界面设计的基本套路
    项目功能演示:放心食用!最后有完整代码.超级详细,期待您的一个点赞❥(^_-)一览全局:WPS项目目录一.创建项目二.导入资源三.ui设计四.字号选择框初始化五.滚动条初始化六.添加自定义文本类七.初始化action状态八.新建文档九.打开文件十.保存与另存为十一.打印/打
  • 2024-09-20PyQGIS开发 2 Qt开发入门
    PyQGISQt开发入门1使用QtDesignerQGIS在安装后已经配套了QtDesigner,可以在开始菜单->QGIS->QtDesignerforQGIS点击运行程序,或者在QGIS安装目录/bin/qgis-designer.bat(或qgis-ltr-designer.bat)点击运行。选择MainWindow模板创建,点击下方的创建后,将创建如
  • 2024-09-19WPF Customcontrol with ellipse and textblock display randomly in canvas of mainwindow
    //usercontrol.xaml<UserControlx:Class="WpfApp381.ElpImgTbk"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  • 2024-09-16快速入门 QT5 C++基础
    1.QT5中文显示乱码方法一:system("chcp65001");//放在主函数中方法二:首先引入库  #include"windows.h"再在主函数中写 SetConsoleOutputCP(CP_UTF8);2.什么是类,如何创建一个类#include<iostream>#include"windows.h"usingnamespacestd;classDog{/
  • 2024-09-14WPF this.DragMove() DropShadowEffect
    //xaml<Windowx:Class="WpfApp367.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mi
  • 2024-09-12pyqt、pyside界面关闭后自动保存已设置参数
    超简单、低耦合!pyqt、pyside界面关闭后自动保存已设置参数文章目录超简单、低耦合!pyqt、pyside界面关闭后自动保存已设置参数前言正文初始思路实现思路1.`getattr()`:用于返回一个对象的属性值。2.`findChildren()`:获得满足条件的所有子对象代码实现`restore_scr
  • 2024-09-10ubuntu20.04 Qt6引用dcmtk库实现dicom文件读取和字符集转换
    1环境问题安装完Qt6,新建Qt/QtQuickCMake工程编译出现如下错误:Foundpackageconfigurationfile:Qt6Config.cmakebutitsetQt6FOUNDtoFALSEsopackage"Qt6"isconsideredtobeNOTFOUND.原因:这是因为系统中缺少OpenGL库,可以安装libgl1-mesa-dev解决方法:su
  • 2024-09-09在 Qt5 中创建一个 HTTP 接口以返回屏幕截图
    在Qt5中创建一个HTTP接口以返回MainWindow的屏幕截图在Qt5中,可以通过使用QTcpServer和QTcpSocket来创建一个简单的HTTP服务器。通过这种方式,我们可以实现一个HTTP接口,当访问该接口时,会返回当前MainWindow窗口的屏幕截图。以下是实现这一功能的详细步骤与相关知
  • 2024-09-08Qt 自动连接机制信号与槽
    概述Qt提供了自动连接机制,可以根据特定的命名规则自动将信号与槽连接。这种机制简化了信号与槽的连接工作,无需显式地调用QObject::connect。命名规则自动连接机制依赖于特定的槽函数命名规则。槽函数名称的格式为:on_<objectName>_<signalName>objectName:是发射信号的对象
  • 2024-09-08MainWindow中监视鼠标移动事件
    实现步骤:重写mouseMoveEvent方法,在其中处理鼠标移动事件。确保MainWindow捕捉到鼠标移动事件,这通常需要启用鼠标追踪(mousetracking),因为默认情况下,鼠标移动事件只在按住鼠标按钮时触发。示例代码:#include<QApplication>#include<QMainWindow>#include<QMouseEvent>
  • 2024-09-08qt 调用微信sdk 具体实现
    一基本功能好的,我理解您想要更具体的实现细节。我会为您提供一个更详细的示例,展示如何在Qt应用程序中集成微信SDK的主要功能。这个示例将包括初始化、登录、分享和支付功能。请注意,由于微信SDK的具体API可能会随版本变化,您可能需要根据您使用的SDK版本进行一些调整
  • 2024-09-04【Qt】消息对话框 QMessageBox
    消息对话框QMessageBoxQMessageBox用于显示一个消息给用户,,并且让用户进行一个简单的选择。消息对话框是应⽤程序中最常⽤的界⾯元素。消息对话框主要⽤于为⽤⼾提⽰重要信息,强制⽤⼾进⾏选择操作。例子:创建一个消息对话框(1)在QtDesigner中设置一个按钮(2)右键点击