Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Creation of custom menubar.

    Solved
    7
    0 Votes
    7 Posts
    1k Views
    A
    @JonB You are right. I will try.
  • QTableWidget has blank cells after I set their strings

    Solved
    11
    0 Votes
    11 Posts
    942 Views
    JonBJ
    @Publicnamer I look forward to your future illustration of such fundamental bugs in QString. The problem with programmers these days is that they do insist there are no bugs (without evidence), I don't agree with your sentiment here. Rather I find the problem with (some) programmers is that they are too quick to blame their tools --- toolkit, Qt, whatever --- when they should reflect on how widely used it is among other people and it is their own code they should examine instead. Speaking at least from experience on this forum I know just how many people come say "there is a bug in Qt" when their own code is faulty. Lots & lots of times....
  • Multiple definition of '__imp___C_specific_handler'

    Solved
    6
    0 Votes
    6 Posts
    832 Views
    JonBJ
    @pingal That is a funny one! Windows should be case-insensitive, filename-wise. However, it looks like MinGW linker is case-sensitive to some degree.
  • The MouseEvent of Qlabel doesn't work, after an advanced click on the label.

    Unsolved
    5
    0 Votes
    5 Posts
    877 Views
    SGaistS
    What exactly do you want to happen when clicking on that QLabel ? The proper way is to create a subclass of QLabel and re-implement mousePressEvent however you can do things a bit differently since you are using Python.
  • MacOS: how to run AppleScript script from a Qt app?

    36
    0 Votes
    36 Posts
    22k Views
    Z
    About running such a script as a QProcess : I am trying to make it work in a sandbox environment (App Store), but I'm not sure wether the main app's entitlements apply to the osascript QProcess launched ? I'm getting access violation errors but I'm not sure if it's because my app is not signed correctly with entitlements, or if maybe it is because I must figure out a way to get the entitlements to apply also to the subprocess...
  • no adapter checked...

    Solved
    1
    0 Votes
    1 Posts
    117 Views
    No one has replied
  • block C++ and waiting for a qml signal to continue execution

    Unsolved
    4
    0 Votes
    4 Posts
    827 Views
    kshegunovK
    @Guigui64 said in block C++ and waiting for a qml signal to continue execution: However I think that, as you recommend, I will turn to another solution, maybe split the code in 2 separate functions and avoid the "blocking" solution.... That's much better, and what you should do, yes. As a side note, QEventLoop is used correctly, as far as your code goes and as far as I can tell, but you should avoid it in principle.
  • How to hide all widgets from a QVBoxLayout with spacer?

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    M
    @Gabber said in How to hide all widgets from a QVBoxLayout with spacer?: The "morph into" function in the QT creator does exactly what you write, doesn't it? There I can also convert the layout into a QWidget. I have hard time to figure out how to convert (morph?) a layout to a widget.
  • Uniquely identify a machine

    Solved
    9
    0 Votes
    9 Posts
    905 Views
    H
    @mrjj said in Uniquely identify a machine: then it should be rare that someone change the mac ID yeah that's what I counting on.
  • Use of undeclared identifier 'inet_pton'

    Solved
    6
    0 Votes
    6 Posts
    805 Views
    Christian EhrlicherC
    As stated in the documentation you gave us, you have to set _WIN32_WINNT to a value greater or equal to Windows 8 and you must not redefine a value defined by the windows headers itself. When you use qmake you can add a compiler definitions with the DEFINE command: https://doc.qt.io/qt-5.12/qmake-variable-reference.html#defines DEFINES += _WIN32_WINNT=0x0602 But since we're here in Qt-forum - why not use QHostAdress?
  • QListView deselect item by clicking on selected Item

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    ?
    @mrjj Thanks for your code example, it works perfectly! I have thought about the whole thing again and will stay for now with a simple select (without shift). Therefore I will mark the thread as solved.
  • How to manage project versions in Linux ?

    Unsolved
    2
    0 Votes
    2 Posts
    158 Views
    mrjjM
    Hi Many use an online code revision system as not to lose code if the system fails. Like https://bitbucket.org/product You don't have to use an online service but if you use it only locally, the safety is lacking. Alternatively, you can use a sync service like pcloud and let it store copies of the projects into the cloud.
  • how to add a suffix to a file after saving it on filedialog in qml

    Unsolved qt5 qml filedialog file
    3
    0 Votes
    3 Posts
    970 Views
    JuniorMLedesmaJ
    Hello, I want to know how to add a suffix to a file after saving it on filedialog in qml and I came here in hope to find my answer. But It makes me sad when I can't find it. I tried filePath = filePath + '.txt' but isn't working for me. Can anyone share a website with me in which I can find the solution? I will be very much thankful to you.
  • why? it shows me these warnings when I generate the slots for my controls.

    Unsolved
    2
    0 Votes
    2 Posts
    287 Views
    C
    These slots are named to take advantage of automatic connections between signals and slots implemented by QMetaObject::connectSlotsByName() and most often used in Qt Designer UIs. This mechanism is not inherently evil. However, if you rename the object in the Designer UI and not the matching slot then the automatic connection will not happen (silently). Conversely (and less likely), if you name a function on_blah_triggered() for a reason unrelated to the UI, but where blah exists and has a triggered() signal, you may find an unexpected connection is made (silently). You will find these at run time. This fragility is the reason for the warning. The alternative is to avoid the automatic connection naming and explicitly code connections in your constructor. If you use new-style connect() then this will fail at compile time in the first case, and the connection will not be present in the second.
  • Is there any official document by Qt for Qt_MVVM or Qt_MVC.

    Unsolved
    2
    0 Votes
    2 Posts
    175 Views
    C
    If you mean official documentation for QtMvvm then no. This is a third-party library, so The Qt Company is not the one to document it. I have no idea what Qt_MVC might be referring to. I suspect the answer is the same.
  • Trying to get records from database with c++ and pass it to listview model

    Unsolved
    4
    0 Votes
    4 Posts
    252 Views
    D
    Text { anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter anchors.leftMargin: 8 font.pixelSize: 12 text: modelData.name color: "#b9b5b5" Component.onCompleted: { console.log(JSON.stringify(modelData.name)) } } so modelData.name does the trick....maybe there are better ways, if someone hve any suggestion, please share
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • does anyone have oauth1 hmac-sha256 working on Qt 6+ ??

    Solved
    2
    0 Votes
    2 Posts
    253 Views
    testmonkeyT
    @testmonkey o2 was updated yesterday with qt6 goodness, included that into the .pro file, changed about 6 lines of code and managed to spit out sha256 signatures. legacy lines of codebase using older o2 had to be changed to from O1RequestParameter to O0RequestParameter. created a patch for the differences to o2 -- https://github.com/pipacs/o2/issues/156 still don't know how to do it natively through qnetworkauth route....
  • This topic is deleted!

    Unsolved
    6
    0 Votes
    6 Posts
    25 Views
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied