Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Using QWebkit for windows with mingw

    Solved
    25
    0 Votes
    25 Posts
    4k Views
    JKSHJ
    @Thank-You said in Using QWebkit for windows with mingw: And I found that many websites doesn't considered it as supported version. Web engines are very difficult to maintain because of security requirements. That is why the Qt Project replaced Qt WebKit (which was mostly maintained by the Qt folks) with Qt WebEngine (which is mostly maintained by the Chromium folks). @Konstantin-Tokarev has done a great job making Qt WebKit compatible with recent versions of Qt, but the last update was over 1 year ago. Lots of security vulnerabilities have been discovered in WebKit since then; that is why many websites don't consider it as a supported version. Main purpose of this is to run services like gmail , google docs and other servuces. Which would be good? Qt WebEngine for desktop platforms; Qt WebView for mobile platforms.
  • Why does a Method only work in my constructor?

    Solved
    19
    0 Votes
    19 Posts
    811 Views
    JonBJ
    @WesLow The problem with your method/variable is that it is too fragile at attempting to correctly keep in sync with what the stacked widget's current page/index actually is. For example, if anything changes s->currentIndex() by whatever means you will not update your variable accordingly. If you really wanted to maintain a variable, a more robust approach would be to look at QStackedWidget's Signals: put a slot on currentChanged(int index) (maybe widgetRemoved(int index) too) and update your variable there. At least that cannot then get "out of sync". But it is still easier to sub-class and add the two methods I showed earlier.
  • Right space is not the same as left space in ScrollArea

    Unsolved
    2
    0 Votes
    2 Posts
    169 Views
    Pl45m4P
    @GrayNeel Probably you are using QScrollArea wrong. It looks like you have set a layout to your scrollArea and placed your buttons inside. The scrollArea is supposed to take one widget with is scollable afterwards.
  • Qt 6.2.2 static Dont detect printers in windows.

    Unsolved
    1
    0 Votes
    1 Posts
    192 Views
    No one has replied
  • Why QMediaPlayer::stop will replay the video?

    Unsolved
    3
    0 Votes
    3 Posts
    371 Views
    JoeCFDJ
    also do you have any cycle play setting?
  • Is it possible to build QT 6.2.2 with C++20?

    Solved
    16
    0 Votes
    16 Posts
    6k Views
    D
    @Dmitriano I am not sure what does it exactly mean but Regarding CMAKE_CXX_STANDARD=17, that's only used for the architecture extraction compile project, see https://bugreports.qt.io/browse/QTBUG-99108
  • QSSLSocket Crash with call to supportsSsl()

    Unsolved
    3
    0 Votes
    3 Posts
    340 Views
    T
    Update 12/10/2021 (today): I just want to share this work-around to fix the issue w/o having to recompile libtensorflow. The temporary solution is to launch the qt application w/ a linker and tell it to preload libssl so that QT wouldn't lazy load the library when it is being accessed. With this fix, I am able to use SSL inside of QT and also tensorflow library (w/ its own version of ssl library). command to run w/ libssl preloaded (in linux): /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 --preload /usr/lib/x86_64-linux-gnu/libssl.so ./upsNativeInterfence
  • QGraphicsItem set item pos using Cursor

    Solved qgraphicsscene qgraphicsview qcursor
    2
    0 Votes
    2 Posts
    698 Views
    D
    For any1 wondering, its more or less > item->setPos(mNodeViewPtr->mapToScene(mNodeViewPtr->mapFromGlobal(QCursor::pos()))); you can most likely do mNodeViewPtr->viewport()->mapFromGlobal() for more precision I think but I didn't test it.
  • Retrieve QList<QString> from a event handler

    Solved
    3
    0 Votes
    3 Posts
    200 Views
    M
    Thanks for the feedback. Ill try your suggestions!
  • I want to output int instead of a string

    Unsolved
    22
    0 Votes
    22 Posts
    3k Views
    Pl45m4P
    @LT-K101 said in I want to output int instead of a string: i used Smales_sql [0][2] and it worked. How surprising :) If you knew your int is in column 3, why do you wrote [0][0]? This will always access the first result, which is always a string, when executing your query. Btw: There is a section on this website, dedicated to PyQt questions :) https://forum.qt.io/category/58/qt-for-python
  • How to embed C4 engine in qt5 as a widget ??

    Unsolved qt5.11
    2
    0 Votes
    2 Posts
    338 Views
    Christian EhrlicherC
    Wouldn't it be better to ask the C4 engine developers how it could work? When their API provides a QWidget or QWindow all is fine. If they need a OpenGL context to work in, it will also work. But I don't think we can answer this.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    24 Views
    No one has replied
  • How to update Qcombobox delegate ?

    Solved
    5
    0 Votes
    5 Posts
    526 Views
    N
    Ya thanks for response I have implemented the same way..
  • Links between items in QTreeItemView

    Unsolved
    2
    0 Votes
    2 Posts
    215 Views
    VRoninV
    @user931357 said in Links between items in QTreeItemView: but sometimes does not or works incorrectly. Can you be more specific about what the problem is? My first thoughts are: When inserting children you are not signaling it (beginInsertRows/beginInsertRows) Run your model alongside the model test. The amount of problems it spots is invaluable
  • How can qmake make a Pro project of type SUBDIRS generate debug and Release makefiles?

    Unsolved
    2
    0 Votes
    2 Posts
    145 Views
    VRoninV
    Untested Try adding CONFIG += debug_and_release
  • Cout in a loop for QLabel Widgets

    Solved qmap loop cout label qlabel
    9
    0 Votes
    9 Posts
    2k Views
    Swati777999S
    @jsulm said in Cout in a loop for QLabel Widgets: @Swati777999 Names[ii] = new QLabel(QString("Name %1").arg(ii)); Works perfectly! Thanks.
  • QtMultimedia and spectrum analyzer

    Unsolved
    6
    0 Votes
    6 Posts
    919 Views
    B
    @vlada I don't quite understand your code since I don't know what's that QByteArray for. My imaginary code (not tested) should be something like qint64 SomeIO::readData(char *data, qint64 len) { if(!mCurrentBuffer.isValid() || mBufferPos >= mCurrentBuffer.byteCount()) { //TODO: save a new QAudioBuffer to mCurrentBuffer mBufferPos = 0; } int byteToCopy = mCurrentBuffer.byteCount() - mBufferPos; if(byteToCopy > len) byteToCopy = len; memcpy(data, mCurrentBuffer.constData<char>() + mBufferPos, byteToCopy); mBufferPos += byteToCopy; return byteToCopy; } This might not work. It's just my idea about how to use a QAudioBuffer.
  • A method for implementing a custom UI.

    Unsolved
    2
    0 Votes
    2 Posts
    226 Views
    J.HilkJ
    @IknowQT I don't think there's an out of the box QWidget hat handles long pressed stuff. You will have to override mousePress and mouseRelease events to measure the time between those two. If you're working with QML however, then I think the MouseArea has a tabandhold signal/property that you could listen to.
  • How to have a window move and repaint simultaneously?

    Unsolved
    2
    0 Votes
    2 Posts
    212 Views
    jsulmJ
    @Guy-Gizmo said in How to have a window move and repaint simultaneously?: its callback function performs the screen capture Maybe you could do the whole screen capture once at the beginning? Then only magnify the part which your currently need.
  • Play sound on Raspberry

    Solved
    10
    0 Votes
    10 Posts
    898 Views
    jsulmJ
    @Pueablo I think @Pablo-J-Rogina wanted to see your slot implementations