Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • setMapping or multiple QSignalMapper objects?

    Solved
    2
    0 Votes
    2 Posts
    116 Views
    SGaistS
    Hi, As shown in the class documentation you can do several mappings.
  • Problem Connection to Postgre SQL in Docker

    Solved
    4
    0 Votes
    4 Posts
    315 Views
    SGaistS
    Glad you found out and thanks for sharing ! Since you have it working now, please make the thread as solved so that other forum users may know a solution has been found :-)
  • QChart initialization error...

    Unsolved
    2
    0 Votes
    2 Posts
    303 Views
    JonBJ
    @potatolover9x Did you try moving the creation of the QChart (and all the rest of the QLineSeries stuff) after the QApplication a(myargc, myargv);? That should be essentially the first statement in a Qt program, before you instantiate any Qt objects.
  • Is there any way to get MAC address of remote IP (Same LAN) with QT code?

    Solved
    3
    0 Votes
    3 Posts
    625 Views
    S
    @JoeCFD thank you I got address by arp -a with bellow code QString getMacAddress(QString Ip) { QString outCmd, error; QProcess process; process.start("arp -a " + Ip); process.waitForFinished(); outCmd = process.readAllStandardOutput(); error = process.readAllStandardError(); // outCmd = "? (192.168.2.222) at 00:17:61:10:a9:47 [ether] on eth0\n"; if(error.isEmpty()) { QRegularExpression re(QStringLiteral("([a-fA-F0-9][a-fA-F0-9]:){5}[0-9a-fA-F][0-9a-fA-F]")); QRegularExpressionMatch match = re.match(outCmd); if(match.hasMatch()){ return match.captured(0); } } return ""; }
  • Different behaviour of icons in vista style vs fusion style?

    Unsolved fusion button icons
    4
    0 Votes
    4 Posts
    802 Views
    Christian EhrlicherC
    @mrjj Yes, sorry :D
  • How can I slow down the scroller speed if the scroll area is small

    Solved
    2
    0 Votes
    2 Posts
    264 Views
    JoeCFDJ
    https://doc.qt.io/qt-5/qscrollerproperties.html#FrameRates-enum Default one is 60. Try to set it to 20 and see if it helps.
  • LNK2005 & LNK1169 error when use QMap between 2 dlls

    Solved
    10
    0 Votes
    10 Posts
    972 Views
    JoeCFDJ
    @rhoekath add Qt naming space to it to see if it helps. #ifndef SERIE_H #define SERIE_H #include <QObject> #include "core_global.h" #include <QVector> #include <QMap> QT_BEGIN_NAMESPACE class CORESHARED_EXPORT Serie : public QObject { Q_OBJECT ....... }; QT_END_NAMESPACE #endif // SORTSERIES_H
  • Get variable from a dialog to MainWindow

    Solved
    9
    0 Votes
    9 Posts
    614 Views
    S
    Ok, I will look into it. Thanks for the tip!
  • Base64 string to QPixmap

    Solved
    13
    0 Votes
    13 Posts
    2k Views
    C
    It works!! Thank you!! You saved my day :) QByteArray rawImage = QByteArray::fromBase64(base64); I think this was the main missing part...
  • Custom tooltip - Modify the shape( Arrow-Shaped in the bottom or on top)

    Solved
    6
    0 Votes
    6 Posts
    477 Views
    H
    @mpergand I actually found the exact code they use on VLC Media Player and it is Qt code. Downloaded the VLC source code Found the media position slider in input_slider.h/cpp in the directory: vlc-3.0.16\modules\gui\qt\util\input_slider.h/cpp and the tooltip class in the same directory with the name timetooltip.h/cpp
  • Qtableview to Qtablewidget

    Solved
    3
    0 Votes
    3 Posts
    241 Views
    JonBJ
    @n-2204 said in Qtableview to Qtablewidget: I have Qtableview (Qstandrditemmodel) : Then why do you want a QTableWidget at all? QTableWidget inherits QTableView, and supplies its own internal model to use. There is nothing you can do with a QTableWidget which you cannot do with a QTableView and your own model.
  • lambda capture syntax

    Solved
    7
    0 Votes
    7 Posts
    857 Views
    JonBJ
    @TheCipo76 And just so you know. The capture [=] means "capture all local variables, by value" ([&] would be the same but all by reference). In this case you only need i, so you could have written [i] here, or [i, j, ..] for individual ones. Just so you know if you want to use that or see it elsewhere in examples.
  • Layout alignment option doesn't actually align widget in QHBoxLayout

    Solved
    21
    0 Votes
    21 Posts
    6k Views
    D
    Thank you, your messages were really helpful! I now understand how these work a lot more.
  • Trying to call python functions from my GUI, compiler is out of heap space

    Unsolved
    17
    0 Votes
    17 Posts
    1k Views
    mrjjM
    @lfreeman6490 Hi What kind of errors ? make sure to read the docs as its a bit hysteric with the compilers https://pybind11.readthedocs.io/en/stable/basics.html The PyObject_CallObject API didnt work for you or why did you give it up so fast ?
  • qt swipe gesture

    Unsolved
    5
    0 Votes
    5 Posts
    473 Views
    I
    @mrjj yes right!
  • How to link a library .a or dll in my project, with cmake in Qt and windows

    Solved
    3
    0 Votes
    3 Posts
    10k Views
    lincolnL
    @JoeCFD Now I get this error. [image: 1d6286e8-d567-4855-8f7c-093396b97940.png] I take it back so I stay at the end and if it worked, thanks man. include_directories(${CMAKE_CURRENT_SOURCE_DIR}/lib/include) unset(MYLIB CACHE) find_library(MYLIB NAMES libQXlsx.a PATHS ${CMAKE_CURRENT_SOURCE_DIR}/lib NO_SYSTEM_ENVIROMENT_PATH) target_link_libraries(untitled2 PRIVATE ${MYLIB})
  • QT Concurrent in VS2019

    Unsolved
    3
    0 Votes
    3 Posts
    247 Views
    A
    So how does that get added in VS2019? I have added the concurrent module in general -> Qt Modules but do i need to add/change anything in the qmake section? If so under what section do i need to make the changes? Thanks
  • Import data from txt file to QTableWidget in Qt

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    SGaistS
    Hi, @hael1902 said in Import data from txt file to QTableWidget in Qt: TableWidgetDisplay When is that method supposed to be called ?
  • Please a solution of this problem in Qt?

    Unsolved
    3
    0 Votes
    3 Posts
    202 Views
    K
    @SGaist thank you.
  • Can a Dock Widget set a View with a custom Model instead of a Widget?

    Unsolved
    3
    0 Votes
    3 Posts
    268 Views
    LoquatL
    @Christian-Ehrlicher oh so it does but in a very long chain of inheritance... I thought it derived only from QAbstractItemView but then I didn't realise the chain is QListView:QAbstractItemView:QAbstractScrollArea:QFrame:QWidget