Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.1k Topics 454.9k Posts
QtWS25 Last Chance
  • This topic is deleted!

    Unsolved
    4
    0 Votes
    4 Posts
    119 Views
  • connect table cell to QLabel

    Unsolved
    6
    0 Votes
    6 Posts
    484 Views
    SGaistS
    You can either use the DecorationRole to show them or a custom QStyledItemDelegate
  • How to switch windows / menus / qwidgets normally?

    Solved
    14
    0 Votes
    14 Posts
    6k Views
    GlimmerG
    @Pl45m4 Copy! Thanks so much for help! Will set solved to this post. :)
  • Calling code from a transition in a state chart

    Solved
    6
    1 Votes
    6 Posts
    848 Views
    M
    @MrShawn Thanks for your message, it helped me a lot ! sorry for my late reply. Your idea of using a state dedicated to checking was very useful. (I am translating the code of a java project in which i used a big switch statement as a state machine, so the state machine model is not exactly the same).
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Scalable graphics with Shape

    Unsolved
    1
    0 Votes
    1 Posts
    157 Views
    No one has replied
  • Multimedia, Windows 7, static libraries

    Unsolved
    2
    0 Votes
    2 Posts
    237 Views
    P
    I ran "configure -list-features" and didn't see anything referencing "multimedia", "audio", or "sound". I tried "configure -list-libraries", and even though I'm running "configure.bat" under Windows, I see lots of Linux stuff--nothing specifically Windows audio related under "multimedia".
  • Sorting data based on key

    Unsolved
    7
    0 Votes
    7 Posts
    713 Views
    VRoninV
    You don't need it. QMap<QString, QJsonValue> map; and then map.insertMulti(QStringLiteral("Unique ID in String"),QJsonValue(/*...*/));
  • How to access property alias

    Unsolved
    5
    0 Votes
    5 Posts
    425 Views
    C
    @dheerendra InputField is the name of the QML file which creates the instance of this keyboard. It is also the id of this AbstractInputField within the script: id: inputField property alias displayValue: currentValue.text property alias placeholderText: currentValue.placeholderText property alias validator: editingValue.validator property int horizontalAlignment: TextInput.AlignLeft property bool doSelection: true readonly property alias isEditing: editingValue.visible signal accepted(string value) height: style.height implicitWidth: editingValue.implicitWidth implicitHeight: editingValue.implicitHeight QQC2.TextField { id: currentValue anchors.fill: parent background: Rectangle{ anchors.fill: parent radius: inputField.style.radius border.width: inputField.style.fieldOutlineSize border.color: inputField.style.fieldOutlineColor } readOnly: true horizontalAlignment: inputField.horizontalAlignment visible: !(editingValue.activeFocus) font: inputField.style.font.font color: inputField.readOnly ? inputField.style.readOnlyFontColor : inputField.style.inputFontColor MouseArea { anchors.fill: parent onClicked: { if (!inputField.readOnly) editingValue.forceActiveFocus() } } } QQC2.TextField { id: editingValue focus: true height: inputField.style.height visible: activeFocus horizontalAlignment: inputField.horizontalAlignment onAccepted: { inputField.accepted(text) keyboardPanel.target = null currentValue.forceActiveFocus() } onActiveFocusChanged: { if (activeFocus) { text = currentValue.text if (doSelection) selectAll() keyboardPanel.target = ( presentationManager.guiSettingsPresenter.model.virtualKeyboardEnabled ? inputField : null ) } else { inputField.accepted(text) keyboardPanel.target = null } } } function cancel() { keyboardPanel.target = null currentValue.forceActiveFocus() } } I really just need access to the displayValue outside of InputField. Perhaps I could do that with signals?
  • RangeSlider without using QML

    Solved
    3
    0 Votes
    3 Posts
    398 Views
    J
    @SGaist mm nice, I thought it needed a special implementation that wasn't done. Thank you!
  • Strange problem, need help or suggestion

    Solved
    1
    2 Votes
    1 Posts
    118 Views
    No one has replied
  • Prevent flat QToolButton from moving when clicked

    12
    0 Votes
    12 Posts
    8k Views
    K
    @Chris-Kawa You are right. QLayout controls size very well. But if we about the best method for topic's problem I think @Lykurg gave the most suituble solution. Nevertheless, I think that adding QLabel upon QPushButton is very simple and usefull thing. At least you will make your colleagues laugh, when you tell them this method.
  • strange bug QML / C++

    Unsolved
    1
    0 Votes
    1 Posts
    198 Views
    No one has replied
  • How can I fix the problem about QMediaPlayer when used on ARM

    Unsolved
    2
    0 Votes
    2 Posts
    266 Views
    SGaistS
    Hi, What version of Qt do you have on your desktop machine ? What version of Qt do you have on your target ? How did you install both of them ?
  • Vector of QLabels

    Solved
    9
    0 Votes
    9 Posts
    1k Views
    Pl45m4P
    @JonB @JonB said in Vector of QLabels: Amazing how these things just happen! Reminds me of: "My code doesnt work, and I dont know why" -> "My code works, and I dont know why" :)
  • QDockWidget ::Title Stylesheet works in Designer but not in runtime

    Solved
    5
    0 Votes
    5 Posts
    560 Views
    M
    It´s working with 5.12.4 -> so this was a bug in 5.11.2! Thanks for testing!
  • How to open multiple windows without decreasing framerate

    Unsolved
    4
    1 Votes
    4 Posts
    500 Views
    M
    @mrjj said in How to open multiple windows without decreasing framerate: Hi This is just random thought. Im not openGL expert. However, i know from open source 3d editors i have befuddled that viewports are often used to have separate views of the scene. https://stackoverflow.com/questions/726379/how-to-use-multiple-viewports-in-opengl However, if this is useful to you or how to do it in Qt, i cant say. Thanks for answering, unfortunately my issue is not with 3D rendering, I also did some tests with 2D content and even without rendering anything in some of the windows, and it seems like the problem is opening another system window. The qglwindow example I mention does render multiple 3D widgets into the same window using a layout without any significant performance impact, but in the very moment you try to make those widgets open their own system window performance tanks. As I mentioned opening just one more window makes the framerate fall to half.
  • This topic is deleted!

    Unsolved
    4
    0 Votes
    4 Posts
    150 Views
  • 'qtConfig' is not a recognized test function

    Unsolved
    5
    0 Votes
    5 Posts
    3k Views
    sierdzioS
    @QtVik said in 'qtConfig' is not a recognized test function: @aha_1980 I am trying to compile it using Qt 5.5.1 uisng MSVC 2010 compiler. It won't work. Charts were added in Qt 5.7 to open source version, and QtCharts from 5.12 definitely won't compile on Qt 5.5. In 5.5, they were still a commercial add-on. So you need to get in touch with Qt Company to get the 5.5 source code for QtCharts.
  • crash in QJsonDocument::fromJson

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    T
    Thanks. I'll try to contact this customer to see if I can have his data to confirm the possibility that his data is corrupted/invalid.