Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • How to select line from left to right with hotkey

    Unsolved
    2
    0 Votes
    2 Posts
    165 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
    681 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
    253 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
    871 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
    291 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
    4k 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
    641 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() } );
  • Combobox Text Color

    Unsolved
    1
    0 Votes
    1 Posts
    176 Views
    No one has replied
  • How to pass QNetworkReply‘s data without copying it into memory

    Solved
    12
    0 Votes
    12 Posts
    570 Views
    jsulmJ
    @Creaperdown said in How to pass QNetworkReply‘s data without copying it into memory: file that QNetworkReply There is no file. The incoming data is put into a buffer from which you then read it. Ideally you simply connect a slot to https://doc.qt.io/qt-6/qiodevice.html#readyRead of your QNetworkReply and read the data every time this slot is called.
  • Qt creator for non qt existing project, include paths

    Unsolved
    1
    0 Votes
    1 Posts
    148 Views
    No one has replied
  • QML How to free memory?

    Unsolved
    1
    0 Votes
    1 Posts
    87 Views
    No one has replied
  • Qt6.5 QML Layout not working well in Linux

    Unsolved
    2
    0 Votes
    2 Posts
    177 Views
    A
    Maybe related to https://bugreports.qt.io/browse/QTBUG-93631?
  • QSG - Using sRGB ICC profile instead of system ICC profile?

    Unsolved
    1
    0 Votes
    1 Posts
    258 Views
    No one has replied
  • What is a good QT C++ test or challenge for a QT newbie?

    Unsolved beginner challenge
    15
    0 Votes
    15 Posts
    2k Views
    C
    @sporefan perhaps make your pure C++ projects again but with Qt this time, you already have those ideas which should be quite advanced (considering your own estimation of your C++ skills), and even better, see if Qt offers a way to make them better, or add more features to them, don't start fresh, build from what you already made with pure C++.
  • How to specify which screen a app "opens" on

    Unsolved
    2
    0 Votes
    2 Posts
    160 Views
    W
    @bigguiness Basically, get a QScreen, and then call setScreen on the widget you want moved to that screen: https://doc.qt.io/qt-6/qwidget.html#setScreen You probably want to do it before the widget is shown.
  • White screen issue on Qt application in MAC os

    Unsolved macos11 localhost
    4
    0 Votes
    4 Posts
    622 Views
    SGaistS
    What was the issue ?
  • QNetwork problems with SSL, any fix or alternatives?

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    SGaistS
    I am suggesting that you install the Qt development packages from your distribution and use that version of Qt to build your application. You don't have to build anything (beside your application).
  • program stops at "QAüülication a(argc, *argv[])

    Unsolved
    8
    0 Votes
    8 Posts
    515 Views
    R
    Hi all and thanks a lot! After, again, installing from scratch Debian and the QtCreator it seems to run :-) No idea why but, at least, the pure widget program skeleton (Create Project) runs and shows the empty window :-) Thanks again!
  • QT USB support

    Unsolved usb qt
    5
    0 Votes
    5 Posts
    1k Views
    SGaistS
    Hi, @astoffregen said in QT USB support: @Christian-Ehrlicher An usb stick This likely means a storage device but a USB stick can be: Storage Bluetooth dongle WiFi dongle Serial port etc. Depending on your exact needs, KDE's Solid framework might be of interest.