Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • How to switch between windows in qt editor short cut

    Unsolved
    4
    0 Votes
    4 Posts
    598 Views
    JonBJ
    @icebergenergy @sierdzio said in How to switch between windows in qt editor short cut: @icebergenergy It's all configurable in Qt Creator's preferences -> environment -> keyboard.
  • Running compiled Qt Web applications on an Ubuntu Server

    Unsolved
    2
    0 Votes
    2 Posts
    211 Views
    JonBJ
    @Boa-man If you cannot rely on the target host having the same version of Qt as you compile for you need something like linuxdeployqt to distribute your application with its required libraries alongside it (i.e. in the same directory, so you do not have to interfere with anything installed in the system).
  • 0 Votes
    5 Posts
    873 Views
    R
    @JonB Thanks, I normally use CQTDeployer. That would mean for other projects the DLLs also need to be added under LIBS in the .pro file ?
  • MySQL table views are not updating

    Solved
    2
    0 Votes
    2 Posts
    487 Views
    Christian EhrlicherC
    How do the values change? From your program or externally? MySQL has no notification support so when it is changed from an external source you have to re-execute the query every time you want to see the new value. If you change the database by yourself you can listen on the dataChanged() or similar functions and trigger the update on the other view accordingly.
  • Could not build webengine for 5.15.9

    Unsolved
    1
    0 Votes
    1 Posts
    168 Views
    No one has replied
  • Prevent Taskbar from displaying in QWidget Fullscreen application.

    Unsolved
    1
    0 Votes
    1 Posts
    147 Views
    No one has replied
  • Big bug in 5.15.8? cannot find double-conversion.h

    Solved
    2
    0 Votes
    2 Posts
    227 Views
    Q
    @QtTester I replace it with 5.15.9 and resolved :-(
  • How to custom a 2D and 3D painting and editing system like this?

    Solved
    5
    0 Votes
    5 Posts
    325 Views
    W
    @JoeCFD ok i will try graphicsview for 2d first.
  • Animate window height without affecting layout?

    Solved
    3
    0 Votes
    3 Posts
    211 Views
    T
    @SGaist Placed everything inside a widget, its working fine now.
  • Table view resize ability with mouse events

    Unsolved table view tableview table widget
    3
    0 Votes
    3 Posts
    794 Views
    L
    @SGaist said in Table view resize ability with mouse events: e resized like any other widge I created a model class and used it in qml as TableView. My goal is to create a view that will be populated with tables, and the tables should be movable and resizable. So I started with one table, then I realized that there is no event for table resizing using the mouse.
  • Is there an event for a titlelbar being clicked on/interacted with?

    Solved
    2
    0 Votes
    2 Posts
    302 Views
    SGaistS
    Hi, Yes it is still relevant. See this comment with regard to your issue.
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    6 Views
  • How to select line from left to right with hotkey

    Unsolved
    2
    0 Votes
    2 Posts
    190 Views
    SGaistS
    Hi, You might want to fix the url to the image. A bit more explanation would also be nice.
  • How Can I force call QHeaderView::paintSection?

    Unsolved qheaderview paint
    4
    0 Votes
    4 Posts
    774 Views
    JonBJ
    @leonardo-M-B Pass topLeft.column(), bottomRight.column() on to headerDataChanged()?
  • Qt widgets not appearing

    Solved widgets troub beginner
    1
    0 Votes
    1 Posts
    298 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    14 Views
    No one has replied
  • Global hotkeys and nativeEvent() is not working in Qt6

    Solved
    3
    0 Votes
    3 Posts
    936 Views
    W
    @hskoglund Thanks for the pointing that out. I guess I did not pay close enough attention to the new declaration.
  • 0 Votes
    2 Posts
    318 Views
    C
    @gserm I have a workaround that might work for you, I used an eventFilter, and enabled auto scrolling on key press, and disabled it on key release. here's how I did it: main.cpp #include <QApplication> #include <QTableWidget> #include <QComboBox> #include <QObject> #include <QEvent> #include "myEventFilter.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); qApp->setStyleSheet( "QComboBox{background: yellow;}" "QTableView::item:hover{color: red;}" ); auto rows = 100; auto cols = 5; auto table = new QTableWidget(rows, cols); for(auto i = 0; i != rows; ++i) { for(auto j = 0; j != cols; ++j) { if(j == 0) { auto item = new QTableWidgetItem("hello"); table->setItem(i, j, item); } else { auto cb = new QComboBox(); cb->addItems(QStringList() << "Item1" << "Item2"); table->setCellWidget(i, j, cb); } } } table->setMinimumSize(800,600); table->setAutoScroll(false); myEventFilter *filter = new myEventFilter(); table->installEventFilter(filter); filter->t=table; table->show(); return a.exec(); } myEventFilter.h #ifndef MYEVENTFILTER_H #define MYEVENTFILTER_H #include <QObject> #include <QEvent> #include <QTableWidget> class myEventFilter : public QObject { Q_OBJECT public: myEventFilter (QObject *parent = nullptr) {}; QTableWidget *t; protected: bool eventFilter(QObject *obj, QEvent *event) override { if(event->type() == QEvent::KeyPress) { t->setAutoScroll(true); } if(event->type() == QEvent::KeyRelease) { t->setAutoScroll(false); } return QObject::eventFilter(obj,event); }; }; #endif // MYEVENTFILTER_H
  • issues with using qt_policy(SET QTP0001 NEW)

    Solved
    18
    1 Votes
    18 Posts
    6k Views
    JKSHJ
    @mzimmers said in issues with using qt_policy(SET QTP0001 NEW): OK, definitely making progress here. It works in my minimal program, and I'm no longer getting the "undefined" error in my real program. Congrats! Several of my qml files are in a subdirectory "custom," which has its own CMakeFiles.txt file Notice that this is a different QML module with a different URI. main.qml needs to do import custom to use Tabbutton Tabbutton.qml needs to do import nga_demo to use Colors realize this no longer pertains to the original question in this topic; would it be better if I opened a new topic for this? Yes, best open new threads for new questions :)
  • Appending a QList<QStringList>

    Solved
    3
    0 Votes
    3 Posts
    870 Views
    JonBJ
    @Dummie1138 In addition to @jsulm. Your "workaround" is good. It takes advantage of void QList::append(const QList<T> &value), which allows you to append one list to another (of the same type) without iterating adding each member individually. You could even just go: configorder.append( { ui->tableWidget_Configs->item(i,1)->text(), ui->tableWidget_Configs->item(i,2)->text(), ui->tableWidget_Configs->item(i,3)->text() } );