Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • How to display huge point cloud via QT?

    Unsolved
    8
    0 Votes
    8 Posts
    2k Views
    H
    @Winz-0 If just for purpose of display point clouds, the method you mentioned is reasonable. my purpose is to debug the algorithm, so it can't discard some ponit cloud.
  • Line spacing in QTextEdit

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    JonBJ
    @Devik said in Line spacing in QTextEdit: bf.setLineHeight(50, QTextBlockFormat.LineDistanceHeight) bf.setLineHeight(lineSpacing, QTextBlockFormat.LineDistanceHeight) If this is your actual code you should get NameError: name 'lineSpacing' is not defined error. If this is not your actual code then we don't know what your code really is. Please only post code which is actually copied & pasted from what you are really testing! The following works fine for me: import sys from PySide2 import QtWidgets, QtGui if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) textEdit = QtWidgets.QTextEdit() textEdit.show() textEdit.setText('Sample text Sample text Sample text Sample text Sample text Sample text Sample text ' 'Sample text Sample text Sample text Sample text Sample text Sample text Sample text') bf = textEdit.textCursor().blockFormat() bf.setLineHeight(50, QtGui.QTextBlockFormat.LineDistanceHeight) # bf.setLineHeight(lineSpacing, QtWidgets.QTextBlockFormat.LineDistanceHeight) textEdit.textCursor().setBlockFormat(bf) sys.exit(app.exec_()) [image: af802165-8aa6-4a4a-aa7b-a057f9664c7b.png] Tested under Ubuntu 22.04, PySide2, Qt5.15. That's all I have.
  • QJSEngine with ConsoleExtension and LoggingCategory

    Unsolved
    1
    0 Votes
    1 Posts
    57 Views
    No one has replied
  • widget size and position issues when on windows 11

    Unsolved
    8
    0 Votes
    8 Posts
    671 Views
    jsulmJ
    @Blackzero said in widget size and position issues when on windows 11: but I specify the maximum size and minimum size To all widgets? If so, then what's the point to resize the window? Or do you set max/min sizes when window if resized? If so - why? Why not simply use layouts?
  • call the dialog inside the loop

    Unsolved
    6
    0 Votes
    6 Posts
    423 Views
    jsulmJ
    @Blackzero said in call the dialog inside the loop: but when the dialog appears the application becomes "Not responding" But does the dialog work? You're using exec() which means you're using the dialog as a modal dialog - the application is blocked until the dialog is closed.
  • QOpenGLWidget gives incorrect h & w values.

    Unsolved
    5
    0 Votes
    5 Posts
    294 Views
    Chris KawaC
    i couldnt understand what u meant by native surface creation Both Qt and OpenGL draw to OS provided surfaces e.g. a window identified by a window handle (HWND). Because of reasons I won't get into here your main window and QOpenGLWidget don't share that resource but create one for each and composite them over one other (well, not necessarily true, but lets keep it simple). Creating those underlying surfaces is relatively costly (in terms of memory consumption, system resources and speed), so when you create a widget it doesn't immediately allocate them. It is deferred to the moment a widget is actually made visible. Until that time a geometry of a widget is unspecified. You can explicitly call e.g. setGeometry or resize, which do record a desired size, but that still doesn't allocate the native surface until the widget is made visible. I mean I am not querying it explicitly, The resizeGL() function is never called explicitly and is always called by the Qt framework Both code snippets you've shown set up the widgets in the main window constructor, so they are shown at the same time and there is only one call to resizeGL from the show() call of MainWindow. That shouldn't exhibit the behavior you describe, so there must be something else you're doing and not showing here. In your callstack window right click anywhere and from the context menu tell it to show external code. It will show you what in your main() is calling resizeGL.
  • i need help in the QT installation

    Unsolved
    14
    0 Votes
    14 Posts
    761 Views
    ?
    this another CMakelist.txt Copyright (C) 2022 The Qt Company Ltd. SPDX-License-Identifier: BSD-3-Clause The test represents the order-related issue that we have with the ld linker. CMake versions < 3.21.0 produce the following linker line: <binary_name> main.cpp -o static_link_order_test libstaticLib.a objlib.cpp.o Since 'static_link_order_test' doesn't have direct use of 'staticlib2.cpp.o' symbols the translation unit is not linked. When we link objlib.cpp.o it cannot resolve symbols from staticlib2.cpp.o. For now it's only applicable for ld-like linkers. 'lld' has no such issue. cmake_minimum_required(VERSION 3.16) project(static_link_order_test LANGUAGES CXX) add_library(objLib OBJECT objlib.cpp) add_library(staticLib STATIC staticlib1.cpp staticlib2.cpp) target_link_libraries(staticLib INTERFACE objLib "$<TARGET_OBJECTS:objLib>" ) add_executable(static_link_order_test main.cpp) target_link_libraries(static_link_order_test PRIVATE staticLib) i'm sorry i'm a beginner in this and starting this project without any past experience, just bear with me please
  • Widget over the QVulkanWindow

    Unsolved
    2
    0 Votes
    2 Posts
    223 Views
    Chris KawaC
    Documentation says: Stacking order; The embedded window will stack on top of the widget hierarchy as an opaque box. As the documentation says it won't work with any layouts or such. Qt draws all its widgets on a window surface and Vulkan draws on another surface that is layered on top. If you want to have something else above that you need another window (frameless and transparent probably).
  • QSizeGrip in QLabel

    Unsolved
    1
    0 Votes
    1 Posts
    106 Views
    No one has replied
  • Videocard problem qt.qpa.backingstore: composeAndFlush: makeCurrent() failed

    Unsolved
    7
    1 Votes
    7 Posts
    5k Views
    H
    I have the same problem, Did you solved it?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • ui detect mouse event on objects

    Unsolved
    26
    0 Votes
    26 Posts
    4k Views
    Pl45m4P
    @Pfanne What are object or function events from your perspective? You can't connect events, you connect signals there. And yes, use the function pointer connection style. Every time you make a signal connection
  • [SOLVED] Terminal Won't Stay Open in Console Project

    8
    0 Votes
    8 Posts
    6k Views
    serkan_trS
    Hi, @Blakeasd, is your operating system Linux? The QT Creator application will run if run as superuser.
  • How to update height of QStandardItem/Delegate?

    Unsolved c++ qt delegate sizehint
    16
    0 Votes
    16 Posts
    2k Views
    S
    @SGaist Thank you very much. One last questions before closing this thread: Does using setListWigetItem (QListWidget) make an difference in performance compared to just using the widgets inside a scrollarea or is the overhead the same? Have a nice day! :)
  • Creating a video file in Qt

    Unsolved video file
    13
    0 Votes
    13 Posts
    5k Views
    V
    @NIXIN you can use opencv to write the frames into .avi or any other format you want to write.
  • Adding Menu Bar with no result..

    Solved
    10
    0 Votes
    10 Posts
    509 Views
    1
    Missed the Title (you wrote it in constructor) menu0 = new QMenu("File"); //or menu0 = new QMenu; menu0->setTitle("File"); If i miss the title, then bar is not being shown.. Thanks.
  • How to fix the blanked out windows in fullscreen mode?

    Unsolved
    10
    0 Votes
    10 Posts
    2k Views
    mzimmersM
    @JoeCFD thanks...it does work with Qt 6.5.3. Evidently, there's something in my application that is the problem. I'll chase it down, and if the answer is worthwhile, I'll post about it.
  • Qt 6.7 Windows 11 Bug with Arabic languarge

    Solved
    36
    0 Votes
    36 Posts
    4k Views
    L
    Thank you, @Christian-Ehrlicher ! I understood your answer after I looked at your QTBUG page answer: https://bugreports.qt.io/browse/QTBUG-124931
  • Playing a GStreamer Pipeline on QGraphicsView

    Unsolved
    9
    0 Votes
    9 Posts
    991 Views
    SGaistS
    @lokeshkr Hi, which version of Qt are you using ?