Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.4k Posts
  • NSView embed in QWidget covers other sibling widgets, why?

    Unsolved
    5
    0 Votes
    5 Posts
    477 Views
    P
    @SGaist can you help me? Thanks very much!
  • How to show uncommitted records of SQLite in QTableView and save/commit later?

    Solved
    8
    0 Votes
    8 Posts
    646 Views
    D
    No idea how it's fixed automatically! In the original posit I'd this if(model->lastError().type() != QSqlError::NoError) instead of ... testModel.lastError().type() ... and emit ... QString::number(model->rowCount()) + " row(s)"); due to copy/paste BUT those were changed long before and the private model/QTableView on the right pane kept getting cleared even after correction! After a break, I just hit Ctrl+R and executed same set of statements and the private model/QTableView doesn't get cleared anymore even if I have those copy/paste errors in my code.
  • Decreasing the size of QCalendarWidget

    qcalendarwidget
    2
    0 Votes
    2 Posts
    2k Views
    V
    To decrease the size of QCalendarWidget you have to find the QTableView inside QCalendarWidget and then set the headers size to zero (or any size you want). You can also set the font size to a small (but visible) value. In the following code cal is a pointer to QCalendarWidget QTableView* calendarView = 0; for(auto i : qAsConst(cal->children())) { calendarView = dynamic_cast<QTableView*>(i); if(calendarView) { qDebug() << "View Found"; QHeaderView* hh = calendarView->horizontalHeader(); QHeaderView* vh = calendarView->verticalHeader(); QFont font = calendarView->font(); font.setPointSize(8); calendarView->setFont(font); hh->setMinimumSectionSize(0); vh->setMinimumSectionSize(0); } }
  • Qpainter drawing semi-transparent line, transparence changes when overlapping

    Unsolved
    2
    0 Votes
    2 Posts
    479 Views
    I
    [image: c0670d4c-398a-4e4c-98ed-7d1cd88a046e.png] This is the main part of my code. I want to use drawline in Qpainter to draw the semi-transparent line, but it does not give me the correct effect.
  • Qmake include order

    Unsolved
    3
    0 Votes
    3 Posts
    425 Views
    D
    I guess the problem is that rather than putting the Qt6 include locations first (specified by Qt Creator), it puts the Qt5 ones first (specified by a separate include folder of vcpkg that also has QtCore(qt5) as well as the library I actually want to include (zeromq). This is causing Qmake to find the Qt5 files first on things that are not included in the .pro file. By that I mean things like QtGui and Qt Widgets end up coming from Qt6, and other things inluded by QtWidgets end up coming from the Qt5 (obviously not desired). This is fixed if I manually change the order of INCPATH in the makefile.debug. If QMake instead put it's own includes first, or at least in the order they appear in the .pro file, then there would not be a problem. Does this make sense? As it is now, it appears that QMake put's things like the include directory for QtCore (-IC:\Qt\6.2.1\msvc2019_64\include\QtCore in my case) at the END of the includes, even if I explicitly include it at the beginning of my .pro file.
  • How to generate xcode project for ios?

    Solved
    8
    0 Votes
    8 Posts
    1k Views
    SGaistS
    It's doesn't change the fact that you need an iOS build of Qt.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Coordinates for QGraphicsView

    Solved
    12
    0 Votes
    12 Posts
    803 Views
    L
    Thanks, you actually helped me resolve the issue. I created a signal/slot when the tab is selected which now shows the view. At that point I get the coordinates and they show properly.
  • Getting data from a video stream for building graphs

    Unsolved
    4
    0 Votes
    4 Posts
    280 Views
    SGaistS
    It depends on the performance you are after but I would say it's likely the better approach.
  • qt3 project to qt5

    Unsolved
    3
    0 Votes
    3 Posts
    342 Views
    SGaistS
    Hi, The simplest is to do it in two steps: Qt 3 to 4 porting which may or may not massive depending on your use of qt3support. Qt 4 to 5 porting which should be way simpler especially if you take proper time to not use any feature deprecated in Qt 5.
  • How to emit parentWidget's signal from its child?

    Solved
    25
    0 Votes
    25 Posts
    4k Views
    D
    @mchinand, in this case it'll be complicated. 2 separate main views (widgets in the stacked widget) rely on that signal. In between child widgets inside QueryWidget, that's ok. TableWidget, which is not a child of QueryWidget, also relies on this signal and in the MainWindow, I instantiate QueryWidget and TableWidget. In this case, I either have to make the child widget of the QueryWidget, that emits the signal, public (or can make it more complex by creating a getter) or create another signal in QueryWidget to connect to the slot of TableWidget. So, to me, the best approach is to make a signal in QueryWidget and let it be used by every other widgets that needs it, be it child or sibling.
  • Add Color to Image in Animation (Cross Dissolve Effect)

    Solved
    4
    0 Votes
    4 Posts
    504 Views
    ?
    @JoeCFD Thank you so much! The InCirc/OutCirc curves worked!
  • debug build - continue after Q_ASSERT (no abort)

    Solved
    5
    1 Votes
    5 Posts
    1k Views
    KH-219DesignK
    I, too, have reinvented this wheel. I was "spoiled rotten" (on this axis, anyway) by using wxWidgets, which does imbue its assert macro with an optional "assert-then-continue" feature. Here you can find my cobbled-together variation on this theme, which works on Linux and Windows. (it also worked on Mac a while back, but I haven't tested recently, and MacOSX has been changing at a fast pace.)
  • Duplicate and rename project in Qt6 with CMake

    Unsolved
    5
    0 Votes
    5 Posts
    916 Views
    VRoninV
    @Bert59 said in Duplicate and rename project in Qt6 with CMake: #project(Project_1 VERSION 0.1 LANGUAGES CXX) If you comment out this line how is CMake supposed to know what the project name is? that's what the error is telling you
  • beginInsertRows & endInsertRows doesn't refresh enough items in view

    Solved
    4
    0 Votes
    4 Posts
    396 Views
    jronaldJ
    The problem should be in QModelIndex DemoModel::parent(const QModelIndex &index) const row in returned QModelIndex should be relative to grand parent. Thanks
  • Does QSqlTableModel have a limit of records?

    Solved
    5
    0 Votes
    5 Posts
    898 Views
    ?
    @JonB I have Qt-Version 5.15.3.
  • QSortFilterProxyModel strange behavior with QRegExp

    Solved
    22
    0 Votes
    22 Posts
    3k Views
    ?
    My problem was solved in this Thread: https://forum.qt.io/topic/131616/does-qsqltablemodel-have-a-limit-of-records
  • QTableWidget's currentCellWasChanged called twice

    Unsolved
    2
    0 Votes
    2 Posts
    161 Views
    SGaistS
    Hi, Which version of Qt ? On which OS ? Can you provide a minimal compilable example that reproduces that behaviour ? Did you check the old and current values ? How do you implement your widget hiding ?
  • QFormLayout, background colour

    Solved
    2
    0 Votes
    2 Posts
    529 Views
    SPlattenS
    @SPlatten , solved, the layout was contained in a widget: mpobjErrors->setStyleSheet("background-colour:#ff0000;");
  • 0 Votes
    15 Posts
    2k Views
    D
    since 29 March 2021 until today (already 7 months), the application not crashing anymore due to every midnight i did restart the operating system Windows Server 2016. Today i just had meeting with our vendor, the vendor still saying nothing wrong with the application , not admitting their application that caused the crash problem, and blame our server's operating system that having problem. I am not programmer/developer so i have nothing to say. At the end of the discussion, our vendor informing us to use Linux Red Hat operating system which they claimed no issue. I will discuss internally about this.