Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • MacOS Valgrind alternative. Which one?

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    D
    @bogong Why don't you use clang's address/leak sanitizer on macOS? with CMake it would be something like this: set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O1 -fsanitize=address -g -fno-omit-frame-pointer")
  • How to set qss property back to its default value?

    6
    1 Votes
    6 Posts
    8k Views
    H
    @old9 The -1 worked perfectly for me for qtoolbar width. I didn't see this documented anywhere and needed it badly. Thank you.
  • In console how to prevent from going to the next line and read text stream

    Solved
    3
    0 Votes
    3 Posts
    251 Views
    A
    @ChrisW67 I think I got it, actually earlier it was opening the Application output console, I just clicked the option of run in terminal in the build & run option and now it's working fine.
  • Qt C++ lnk2019 errors with opengl widget

    Unsolved
    8
    0 Votes
    8 Posts
    2k Views
    jsulmJ
    @mateuszusd said in Qt C++ lnk2019 errors with opengl widget: What should do to solve this problem in visual studio2022 What was already suggested
  • 0 Votes
    33 Posts
    11k Views
    T
    Thanks to all for support and your valuable suggestions. I am successfully made executable file using (Qt creator 5.9.5) compiler version (Mingw 5.3.0) using windeployqt.
  • Color management on Qt5 and Qt6 (macOS)

    Unsolved
    2
    0 Votes
    2 Posts
    275 Views
    jsulmJ
    @metamerism Please post the quests
  • 0 Votes
    3 Posts
    393 Views
    ademmlerA
    @johngod Thx John I checkt his out but it did not worked. However I found simple a solution: The rendering of Qt is in pixels without any scaling. This means that the scaling factor is (physical screen resolution / divided by image desinty)
  • QRegex help

    Unsolved
    2
    0 Votes
    2 Posts
    187 Views
    C
    @Rua3n By default: The RE dot . does not match newlines A string containing multiple newlines is a single string to the RE Your RE tester is feeding the lines in your test string one at a time. You are feeding the RE all the input as a single string. The RE cannot match because the first newline in the string cannot be consumed by the .* Try: QRegularExpression regex(s, QRegularExpression::MultilineOption); This will not remove lines, but it will remove the text matched leaving a vestigial \n
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • Qt from crontab errors

    Unsolved
    5
    0 Votes
    5 Posts
    648 Views
    C
    I am going to guess that you are trying to create some sort of kiosk machine that automatically launches a UI at system start. If that is what you are after then you should consider: Enable Autologin Use a custom .xsession file to launch your application when X starts. Other ways to address this involve using /etc/inittab (not crontab) to launch a script that starts X and then your kiosk application. This approach can ensure the UI is restarted if it crashes. How this interacts with a systemd-ified environment I cannot say.
  • Make Qt terminal app executable and add it to favorites tab @ Ubuntu

    Unsolved
    5
    0 Votes
    5 Posts
    551 Views
    C
    @JacobNovitsky Right-click where exactly? The right-click menu is generally context sensitive and also populated with actions not applications.
  • How to install Qt 6.4.3 or newer (fresh update) without gui

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    SGaistS
    Hi, Here you have the documentation on how to sue the online installer from the command line. Otherwise, there is also the aqinstall project.
  • How to rotate QGraphicsItem right after mouse?

    Solved
    5
    0 Votes
    5 Posts
    709 Views
    johngodJ
    @Valderman I did something like that in a project of mine, but with a difference that the rectangle does not rotate in his center but rotates relative to a center defined in a first click position called commandInitialPos, then you do a second click to start rotating, then you move the mouse to rotate. I am posting the relevant code I used may it can be helpfull for you to adapt the relevant pseudo code and link to the project: https://bitbucket.org/joaodeusmorgado/techdrawstudio/src/142960ab5c809ddcbd20fb40f294e01d85c850d5/qml/qmlEntities/EntityTemplate.qml#lines-117 //first click - define the center of rotation onCommandCprStart: function(pos) { commandInitialPos = pos //assume that pos is the mouse click position } https://bitbucket.org/joaodeusmorgado/techdrawstudio/src/142960ab5c809ddcbd20fb40f294e01d85c850d5/qml/qmlEntities/RectangleThick.qml#lines-39 //second click - start rotation position onCommandCprUpdate: function(pos, ....){ rotateStartPoint = pos //save the start rotation position //calculates and saves the start angle rotateStartAngle = mathLib.angleFromPoints(commandInitialPos, rotateStartPoint) rectP0aux = re.p0 // here I just saving the rectangle initiall position vertexs rectP1aux = re.p1 rectP2aux = re.p2 rectP3aux = re.p3 } https://bitbucket.org/joaodeusmorgado/techdrawstudio/src/142960ab5c809ddcbd20fb40f294e01d85c850d5/qml/qmlEntities/RectangleThick.qml#lines-75 onCommandMtm: function(pos, ....){//this is equivalent to mouse move rotateUpdateAngle = mathLib.angleFromPoints(commandInitialPos, pos) var angle = rotateUpdateAngle - rotateStartAngle // lets do it baby, lets rotate it, yeahhhh, updates the rectangles vertices, which is the rotation re.p0 = mathLib.rotate2DFromPoint(commandInitialPos, angle, rectP0aux) re.p1 = mathLib.rotate2DFromPoint(commandInitialPos, angle, rectP1aux) re.p2 = mathLib.rotate2DFromPoint(commandInitialPos, angle, rectP2aux) re.p3 = mathLib.rotate2DFromPoint(commandInitialPos, angle, rectP3aux) } https://bitbucket.org/joaodeusmorgado/techdrawstudio/src/142960ab5c809ddcbd20fb40f294e01d85c850d5/mathlib.cpp#lines-103 QVector3D MathLib::rotate2DFromPoint(const QVector3D &center, const float &angle, const QVector3D &p) const { float cosAngle = qCos(angle); float sinAngle = qSin(angle); float x = cosAngle*p.x() - sinAngle*p.y() + center.x() - cosAngle*center.x() + sinAngle*center.y(); float y = sinAngle*p.x() + cosAngle*p.y() + center.y() - sinAngle*center.x() - cosAngle*center.y(); return QVector3D(x, y, p.z()); } This is the rectangle rotating: [image: x7eha2y]
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • Is it possible to pop a mainformwidget in and out of a Tab widget?

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    V
    @visinet After some more playing with tabifyDockWidget, I got it figured out and working. I just always use the main/first dockwidget as the first parameter and the newly dynamically created dockwidget as the second. When I was originally looking at the tabifyDockWidget function I just wasn't understanding the concept. Thanks again.
  • How to choose a set of plug-in libraries depending on the selected Kit

    Solved
    2
    0 Votes
    2 Posts
    159 Views
    8Observer88
    I found a solution here: Qt .pro file get Qtkit name CONFIG("windows") { INCLUDEPATH += $$PWD/libs/openal-soft-desktop-1.23.1/include LIBS += -L$$PWD/libs/openal-soft-desktop-1.23.1/lib/x64 LIBS += -lOpenAL32.dll } CONFIG("armeabi-v7a") { INCLUDEPATH += $$PWD/libs/openal-soft-android/include contains(ANDROID_TARGET_ARCH, armeabi-v7a) { ANDROID_EXTRA_LIBS += $$PWD/jniLibs/armeabi-v7a/libopenal.so } } CONFIG("x86_64") { INCLUDEPATH += $$PWD/libs/openal-soft-android/include contains(ANDROID_TARGET_ARCH, x86_64) { ANDROID_EXTRA_LIBS += $$PWD/jniLibs/x86_64/libopenal.so } }
  • How to write a data into csv file colmn by column

    Unsolved
    2
    0 Votes
    2 Posts
    212 Views
    JonBJ
    @swapna-v There isn't much to say. Build each line output as comma-separated values from the columns.in a loop. No reason for it to stop at 2 columns, and nobody can say why you say "printing continuously". Your output seems to show you are saving columns as multiple lines. You don't show your produced CSV file, you don't show the code you write.
  • Qopenglbuffer - 64 bit addressing?

    Solved
    7
    0 Votes
    7 Posts
    630 Views
    SGaistS
    AFAIK, most if not all games adapt the level of details based on the zoom factor because there's no sense in calculating all the details of the grass at the limit of the forest located 2km away from you. But it start making sense when you are close to it.
  • Failed to find required Qt component "Core5Compat".

    Unsolved
    2
    0 Votes
    2 Posts
    293 Views
    hskoglundH
    Do you mean this one: [image: c23540ce-d527-463b-b3d9-21a89d2af560.png]
  • Bug in QImage

    Solved
    10
    0 Votes
    10 Posts
    755 Views
    Christian EhrlicherC
    @wostka said in Bug in QImage: Not a bug, a feature... :D No feature but a mandatory thing - otherwise there is no reference to the resource and the lnker can throw it away.