Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • QNetworkRequest force to use HTTP 1.0

    Unsolved
    3
    0 Votes
    3 Posts
    652 Views
    raven-worxR
    @trallallerotrallalla All Qt network requests are fixed to HTTP/1.1 The only way to enforce HTTP/1.0 is to create a custom QTcpSocket to the server and send a "raw" request. But this means you will have to do the HTTP parsing of the response all by yourself.
  • Display text name file when push button is clicked

    Unsolved
    5
    0 Votes
    5 Posts
    658 Views
    L
    Thank you mrjj !
  • outlook.exe does not exist

    Solved
    15
    0 Votes
    15 Posts
    2k Views
    JonBJ
    @nicholaslee It is unclear why you should ever receive the message: Executable D:\Desktop\build-Outlook-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\Outlook.exe does not exist. The executable for your project should be that path but with Qutlook.exe instead of Outlook.exe at the end. The question is where your Outlook.exe is coming from. I do not believe your app is getting as far as any attempt to use/contact any MS Outlook stuff, it is failing to find the executable of your app to run in the fist place. It seems to be attempting to run the wrong executable name. You could at least test that by having your code output a message very first thing, which I think you will not see. Furthermore, the path includes build-Outlook-Desktop_Qt_5_0_2_MinGW_32bit-Debug. Why is that Outlook and not Qutlook? Did you name the project Outlook rather than Qutlook at some point? I would look carefully at your project.
  • DigistAuth for QMediaPlayer

    Unsolved
    1
    0 Votes
    1 Posts
    260 Views
    No one has replied
  • Can't remove file

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    Roy44R
    It works with new permissions. thanks
  • QOpenGLWidget makes entire window black on resize

    Unsolved
    3
    0 Votes
    3 Posts
    792 Views
    XYZ916X
    @Roy44 Have you solve your problem? I have the same problem as you mentioned. If you have any ideas on the problem ,I'll appreciate it when you can share your solutions with me .Thank you~
  • QRegExp Global Flag

    Unsolved
    7
    0 Votes
    7 Posts
    1k Views
    webzoidW
    @JonB Works like a treat, thanks for your help. I shall no longer use QRegExp. Thanks again
  • Inheritance with QObject (parent?)

    Solved
    4
    0 Votes
    4 Posts
    3k Views
    J.HilkJ
    @robro said in Inheritance with QObject (parent?): This leads to the following error: "Conversion from B* to QObject* is already existing but it cannot be accesed" How can I solve that? you declared the base class protected: class B : protected A And therefore can't be accessed from outside the class, I would change that.
  • QMetaObject::connectSlotsByName: No matching signal

    Unsolved
    16
    0 Votes
    16 Posts
    6k Views
    aha_1980A
    @shivaVMC please don't use waitForReadyRead, use the readyRead signal instead! You are blocking the event loop here and it's likely that your app is not working as expected.
  • how to create a subclass to rotate a text in a tabbar of tab widget

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    sankarapandiyanS
    @VRonin oh !!,So we are using Null instead of Q_NULPTR thanks VRonin
  • This topic is deleted!

    Solved
    2
    0 Votes
    2 Posts
    11 Views
  • Scroll Area in QDockWidget

    Unsolved
    9
    0 Votes
    9 Posts
    4k Views
    mrjjM
    @Andaharoo well you need to set some minimum on the "row" it seems.
  • 0 Votes
    6 Posts
    1k Views
    SGaistS
    Getting old... I forgot that it was an option for Qt 4 when not all compilers supported exceptions which is not the case anymore.
  • QGraphicsTextItem with ItemIgnoresTransformations causing flickering

    Unsolved
    1
    0 Votes
    1 Posts
    384 Views
    No one has replied
  • dll missing

    Unsolved
    5
    1 Votes
    5 Posts
    993 Views
    mrjjM
    @Zetta Just a few hints. Make exe in release mode never mix Qt DLLs with D in name and no D. (debug Qt dlls have D last in name ) Sometimes on some system, like win 7, the compilers runtimes dlls are also needed. Like for visual studio or mingw.
  • Display information on the fly

    Unsolved
    16
    0 Votes
    16 Posts
    3k Views
    VRoninV
    DEATH TO setItemWidget! #include <QApplication> #include <QStyledItemDelegate> #include <QStandardItemModel> #include <QSortFilterProxyModel> #include <QTreeView> #include <QHeaderView> #include <QPushButton> #include <QHBoxLayout> #include <QVBoxLayout> int main(int argc, char **argv) { QApplication app(argc, argv); QStandardItemModel model; model.insertColumns(0,3); model.insertRows(0,3); for(int i=0;i<3;++i){ model.setData(model.index(i,0),QStringLiteral("autor")); model.setData(model.index(i,1),QStringLiteral("resolution")); model.setData(model.index(i,2),QStringLiteral("type")); model.setData(model.index(i,0),Qt::Unchecked,Qt::CheckStateRole); model.item(i,0)->setFlags(model.flags(model.index(i,0)) | Qt::ItemIsUserCheckable); } QWidget mainWid; QTreeView* mainView = new QTreeView(&mainWid); const QColor backColor = mainWid.palette().background().color(); mainView->setStyleSheet(QStringLiteral("QTreeView{border: 0px;background-color:%1;} QTreeView::item:hover{background-color:%1;}").arg(backColor.name(QColor::HexRgb))); mainView->setModel(&model); mainView->setIndentation(0); mainView->setSelectionMode(QAbstractItemView::NoSelection); mainView->setSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Preferred); mainView->header()->setSectionResizeMode(QHeaderView::Stretch); mainView->header()->hide(); mainView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); mainView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); QVBoxLayout* mainLay = new QVBoxLayout(&mainWid); mainLay->addWidget(mainView); QHBoxLayout* buttonLay=new QHBoxLayout; buttonLay->addSpacerItem(new QSpacerItem(1,1,QSizePolicy::Expanding,QSizePolicy::Preferred)); buttonLay->addWidget(new QPushButton(QStringLiteral("select"),&mainWid)); mainLay->addLayout(buttonLay); //mutual exclusion. QObject::connect(&model,&QAbstractItemModel::dataChanged,[&model](const QModelIndex& idx,const QModelIndex&,const QVector<int>& roles){ #if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) if(!roles.contains(Qt::CheckStateRole) continue; #endif if(idx.column()==0 && idx.data(Qt::CheckStateRole)==Qt::Checked){ for(int i=0, maxRow =model.rowCount() ;i<maxRow;++i){ if(i==idx.row()) continue; model.setData(model.index(i,0),Qt::Unchecked,Qt::CheckStateRole); } } }); mainWid.show(); return app.exec(); }
  • "ABC - Extended" macOS Keyboard stealing kb shortcuts?

    Solved
    4
    0 Votes
    4 Posts
    491 Views
    SGaistS
    I do wonder at what level this happens...
  • 0 == 1 == 2 ???

    Solved
    9
    0 Votes
    9 Posts
    2k Views
    devDawgD
    @JonB scriptpathname.sh, as I stated earlier, is not a valid script, it is simply a placeholder. Thanks for the help!
  • connect in qt using two different classes

    Unsolved
    2
    0 Votes
    2 Posts
    354 Views
    K
    @jaouad100 You would make life a bit easier when you are introducing a bool in the parameter list of onPushButton. form.hpp class Form : public QDialog { Q_OBJECT public: explicit Form(); public slots: void onPushButton(bool); }; form.cpp Form::Form() : QDialog(parent), ui(new Ui::Form) { ui->setupUi(this); connect(ui->PushButton, SIGNAL(clicked( bool ) ), this, SLOT(onPushButton ( bool ))); // assumes name of QPushButton is PushButton // connect(ui->PushButton, &QPushButton::clicked, this, &Form::onPushButton ); } The alternative connect requires exact the same parameter lists. It give you already a compile error. The first version would allow to have different parameter lists, but for starting it ios easier to understand when you keep them the same.
  • scrollbar in qStylesheet

    Unsolved
    5
    0 Votes
    5 Posts
    751 Views
    H
    @JonB I just added image in resources and its done.