Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • XML to Graph Representation

    Unsolved
    6
    0 Votes
    6 Posts
    718 Views
    SGaistS
    Hi, Which part of your code triggers this error ?
  • How to change pushbutton icon on pressed?

    Unsolved
    2
    0 Votes
    2 Posts
    381 Views
    Pl45m4P
    @Pythonic-person You can use stylesheet and the pressed indicator/subcontrol https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-the-qpushbutton-s-menu-indicator-sub-control
  • How to update column B of a QSqlRelationalTableModel after the update of column A?

    Unsolved
    6
    0 Votes
    6 Posts
    531 Views
    P
    This is what I 've done and seems to work: bool ArticlesModel::setData(const QModelIndex &index, const QVariant &value, int role){ int nameColumnIndex = 1; int name_lowerColumnIndex = 3; if(index.column() == nameColumnIndex){ int row = index.row(); QModelIndex name_lower_index = index.model()->index(row,name_lowerColumnIndex); QString v = value.toString(); ArticlesModel::setData(name_lower_index, v.toLower(), Qt::EditRole); } return QSqlTableModel::setData(index, value, role); } Is it ok?
  • Is QAbstractItemModel re-entrant

    Solved
    9
    0 Votes
    9 Posts
    701 Views
    Christian EhrlicherC
    @ocgltd said in Is QAbstractItemModel re-entrant: I have it working now, but the view shows blank rows until the data arrives. Then you're doing something wrong. When no data is available, you should return '0' as row count... (already said at least three times).
  • Errors in subclass of QSqlRelationalDelegate

    Solved
    12
    0 Votes
    12 Posts
    1k Views
    P
    @JonB (and to all of course) thank you for your time and effort! In python it works fine, I will try your code but I am sure it's fine!
  • Component Driven Design

    Solved
    4
    0 Votes
    4 Posts
    495 Views
    SGaistS
    By the way, there's also an equivalent for QtQick.
  • Qt: Item Delegate With Different Height And Width

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    SGaistS
    There's not need to go through the model, you already have the index and can retrieve the data from it. You can set the spacing QListView::setSpacing.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    19 Views
    No one has replied
  • QByteArray of char* to QString

    Solved
    6
    0 Votes
    6 Posts
    535 Views
    M
    Dang, that was it. I swear I tried that yesterday, but I probably had it wrong as I was tired and throwing code around trying to make it work. Thanks once again for the help!
  • [Learning] How to use Libpcap library in Qt

    3
    1 Votes
    3 Posts
    6k Views
    N
    hi thanks for your topic, i have some more question about pcab , can u tell me how can i run this type of program in qt , in ubunto as administrator , and how to learn more??
  • What is the difference between these two layout assignee methods

    Unsolved
    2
    0 Votes
    2 Posts
    200 Views
    Christian EhrlicherC
    @Pythonic-person said in What is the difference between these two layout assignee methods: are they the same? Yes, according to the documentation.
  • Qt CMake project cannot be build outside QtCreator

    Unsolved
    2
    0 Votes
    2 Posts
    436 Views
    C
    Quite possibly ensuring the compiler's binary folder (s) are in the PATH of the environment cmake is launched in. From the command line you ran the failing cmake from, does this run C:\Qt\Tools\mingw492_32\bin\gcc.exe -v
  • Creating Widgets Above Stacked Widget

    Unsolved
    2
    0 Votes
    2 Posts
    169 Views
    SGaistS
    Hi, For your "menues", don't put them in a layout and manage their position manually. For the status bar: QStatusBar.
  • Calling functions between classes

    Solved
    21
    0 Votes
    21 Posts
    2k Views
    SGaistS
    Good, then please mark the thread as solved so other forum users may know a solution has been found :-)
  • TCP Server Connection

    Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    A
    @Christian-Ehrlicher Okey, I will try it, thanks for the help :)
  • How to add default “Open recent” macOS menu item in Qt application?

    Solved
    9
    0 Votes
    9 Posts
    2k Views
    M
    @EekTheCat perfect, thanks a lot
  • QModbusTcpServer: Find out if clients are connected

    Unsolved
    1
    0 Votes
    1 Posts
    132 Views
    No one has replied
  • Building with dll (canbus driver)

    Solved
    8
    0 Votes
    8 Posts
    836 Views
    M
    Yes! It built. Thank you for the help!!
  • mouseMove events go to wrong MDI window when overlapping (Qt5 macOS only)

    Solved
    3
    0 Votes
    3 Posts
    295 Views
    I
    Thanks for the suggestion. Moving my whole app to Qt6 to test that would have been a big job so I started making a minimum reproduction case. Using the examples as a starting point I noticed that they no longer use QGLWidget, instead using the newer QOpenGLWidget. I tried QOpenGLWidget for the minimum reproduction case and it worked ok. After modifying my app to also use QOpenGLWidget the mouseMoveEvent problem was solved. This also fixed some janky behavior where the MDI subwindow had not been responding to clicks on the traffic light buttons, and sometimes could not be dragged. It seems that QGLWidget remains only as a convenience for older code so is probably no longer being tested. https://www.qt.io/blog/2014/09/10/qt-weekly-19-qopenglwidget https://doc.qt.io/qt-5/qopenglwidget.html#details
  • Accessing mainwindow from another class

    Solved
    5
    0 Votes
    5 Posts
    490 Views
    T
    @SGaist i did change a few things in the structure and now with signals and slots it works, thanks for the hint.