alpqr / qrhiimgui2 Goto Github PK
View Code? Open in Web Editor NEWNew Dear ImGui - Qt Quick integration (Qt 6.4+ only)
New Dear ImGui - Qt Quick integration (Qt 6.4+ only)
As title, while opening a filedialog, if there is a imgui quickitem set to "visible", the filedialog couldn't work normally. If set all imgui node to be invisible, filedialog can work again.
It only happens for native filedialog under linux. Windows works fine, so as non-native qml based filedialog.
Adding filedialog and a button to open it in simple/main.qml
import QtQuick
import QtQuick.Controls
import QtQuick.Dialogs
import QtQuick.Layouts
import ImguiExample
Item {
Rectangle {
color: "transparent"
anchors.fill: parent
Rectangle {
id: imguiContainer
property bool fullWin: true
property bool useTex: false
layer.enabled: useTex
color: "transparent"
width: fullWin ? parent.width : parent.width - 200
height: fullWin ? parent.height : parent.height - 400
x: fullWin ? 0 : 100
y: fullWin ? 0 : 100
z: ztimer.running ? 1 : 0
Imgui {
id: gui
objectName: "gui"
anchors.fill: parent
SequentialAnimation on opacity {
id: opacityAnim
running: false
NumberAnimation { from: 1; to: 0; duration: 3000 }
NumberAnimation { from: 0; to: 1; duration: 3000 }
}
}
Timer {
id: ztimer
repeat: false
interval: 10000
}
}
Rectangle {
border.width: 2
border.color: "black"
y: 50
width: 400
height: 50
clip: true
TextEdit {
id: textEdit
anchors.fill: parent
text: "TextEdit to test focus"
font.pointSize: 20
color: "blue"
}
}
RowLayout {
y: 20
Button {
text: "Toggle visibility"
onClicked: gui.visible = !gui.visible
}
Button {
text: "Toggle size"
onClicked: imguiContainer.fullWin = !imguiContainer.fullWin
}
Button {
text: "Animate opacity"
onClicked: opacityAnim.running = true
}
Button {
text: "Move to top for 10 sec"
onClicked: ztimer.running = true
}
Button {
text: "Toggle layer (full size only)"
onClicked: imguiContainer.useTex = !imguiContainer.useTex
}
Button {
text: "File Dialog"
onClicked: fd.open()
}
}
}
Column {
anchors.right: parent.right
Text {
text: "ImGui item visible: " + gui.visible
+ "\ncovers entire window: " + imguiContainer.fullWin
+ "\npart of an Item layer: " + imguiContainer.useTex
+ "\nstacks on top of buttons/textedit: " + ztimer.running
color: "white"
}
}
FileDialog {
id: fd
fileMode: FileDialog.SaveFile
nameFilters: ["proto (*.pbtxt *.pbjson *.pb)"]
onAccepted: () => {
console.log(selectedFile);
}
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.