Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • QtLogo

    2
    0 Votes
    2 Posts
    1k Views
    M
    Are qtlogo.h and qtlogo.cpp added into your .pro file?
  • [Solved] Qt5 compilation errors with qopengles2ext.h

    2
    0 Votes
    2 Posts
    3k Views
    W
    I solved this problem by including Qt Widgets headers individually rather than simply #include <QtWidgets>.
  • I cant handle with the Pics

    4
    0 Votes
    4 Posts
    1k Views
    sierdzioS
    Perfect :D Please add [Solved] to the beginning of this topic's subject if you have no further questions related to this problem.
  • Best way to handle large number of preprocessor definitions?

    9
    0 Votes
    9 Posts
    4k Views
    JKSHJ
    [quote author="floatingWoods" date="1353165219"]Actually the original application was a visual studio project and pure MFC. That application can still be compiled within visual studio (i.e. all Qt code is excluded in that case with many ifdef-s). When compiling with Qt Creator, then all the MFC code gets excluded (here too, with lots of ifdef-s).[/quote] You don't have to do that. Like MuldeR said, you can use Visual Studio to compile Qt programs.
  • Showing unicode characters in a QString on mac

    2
    0 Votes
    2 Posts
    1k Views
    JKSHJ
    Since QLabel takes a QString, you can write @ QLabel texte(QString::fromUtf8("éèê"), &fenetre); @ For non-Qt programs, you need to use C++11's Unicode support: http://en.wikipedia.org/wiki/C++11#New_string_literals
  • How using and enjoying SOAP in Qt?

    3
    0 Votes
    3 Posts
    2k Views
    F
    I'm already in testing with QtSoap, but without success. You know QtSoap use?
  • Virtual Keyboard Qt5

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Crash when calling static getExistingDirectory in release mode of VC 2005

    5
    0 Votes
    5 Posts
    4k Views
    K
    Thanks for reply. That is checked. Settings is assigned and the first statement (line 3 in first post) retrieves the correct name. As soon as the getExistingDirectory is not called it does work also under release.
  • Error on Compile Release Mode on Windows

    2
    0 Votes
    2 Posts
    2k Views
    D
    Well, I don't that error can give me problems! At this moment, I'm not sure!
  • [Resolved] Image doesn't load on Screen... [Windows only]

    12
    0 Votes
    12 Posts
    5k Views
    D
    Resolved: Add to installer the plugins: @ iconengines sqldrivers @
  • [SOLVED]QTreeView - removing a row

    4
    0 Votes
    4 Posts
    7k Views
    D
    OK, thanks :-)
  • QUdpSocket in the QThread - critical errors

    9
    0 Votes
    9 Posts
    6k Views
    JKSHJ
    [quote author="nibbit" date="1353074432"]Yes. I know that subclassing QTHread is not recommended. But I was trying both method and there is no difference in the program activity.[/quote]Well, programming rules are not fixed. As long as you know what you're doing, it's ok to break them during appropriate times :) [quote author="nibbit" date="1353074432"]Now all is working great and really I am not sure why. In this case I am using my own blocking method instead of socket blocking method. Now I can use my socket even in the way as I want :). [/quote]Hmm... it has become a hidden bug. Your code is still unsafe, and it can still crash if you deploy the program on a different computer, or if other parts of your code get updated. It would be wise to protect your program with mutexes, if you want to do it this way.
  • Hidden file and symlinks

    2
    0 Votes
    2 Posts
    1k Views
    3
    Have you tried @QDir::System #0x200 List system files (on Unix, FIFOs, sockets and device files are included; on Windows, .lnk files are included) @ A full list of Filter-enums can be found here: http://qt-project.org/doc/qt-4.8/qdir.html#Filter-enum hope this helps :)
  • [SOLVED] QTreeView - getting the current item via the model index

    9
    0 Votes
    9 Posts
    16k Views
    D
    :-) @ QModelIndex index = m_view->currentIndex(); if(index.isValid()) { CMenuTreeRow *current = (CMenuTreeRow *) m_model->itemFromIndex(index); if(current) { int currentRow = current->row(); CMenuTreeRow *parent = (CMenuTreeRow *) current->parent(); if(parent)//we are at top of tree - do not delete! { QModelIndex parentIndex = parent->index(); m_model->removeRow(currentRow, parentIndex); } } }@
  • QThread stack-address

    3
    0 Votes
    3 Posts
    2k Views
    F
    Helps a lot. Thank you very much for explaining rcari.
  • Failing to use QFileSystemModel in Qt

    4
    0 Votes
    4 Posts
    1k Views
    S
    Yes this works well too :) [quote author="MuhamedAuda" date="1353055115"]* you mean treeView model base not item based like this regard less how many columns you can do this using for @{ ui->setupUi(this); // you mean treeView model base not item based like this QFileSystemModel *model = new QFileSystemModel(this); model->setRootPath(QDir::homePath()); ui->treeView->setModel(model); // regard less how many columns you can do this using for: for(int i = 1; i < model->columnCount(); i++) ui->treeView->hideColumn(i); }@[/quote]
  • Move QPixmap to QLabel

    3
    0 Votes
    3 Posts
    3k Views
    S
    Thanks, but this looks like copy According to the declaration setPixmap(QPixmap const &) Const& wouldn't increase reference count I don't think they will share the same resource and the implementation looks more like copy than move @ void QLabel::setPixmap(const QPixmap &pixmap) { Q_D(QLabel); if (!d->pixmap || d->pixmap->cacheKey() != pixmap.cacheKey()) { d->clearContents(); d->pixmap = new QPixmap(pixmap); } if (d->pixmap->depth() == 1 && !d->pixmap->mask()) d->pixmap->setMask(*((QBitmap *)d->pixmap)); d->updateLabel(); } @ looks like the QLabel will create a brand new copy of the QPixmap if the d->pixmap do not point to anything or they don't have the same cacheKey. But the behavior I want is something like @ QPixmap *temp = origin_pixmap; origin_pixmap = new_pixmap; temp->release() @ or @ std::string A, B; //............. A = std::move(B); @
  • Display Audio/Video files details in ListView (Qt)

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • QTableView renders wrong.

    4
    0 Votes
    4 Posts
    1k Views
    W
    Sorry I describe it here: "example image":http://rghost.net/41600810/image.png As you can see in the image, setting "background-color" style property together with using QStyle::SH_ScrollView_FrameOnlyAroundContents style hint property, renders incorrect. A workaround this is to change QPalette::Base color and assign the new palette to the tableview, but this is cumbersome.
  • Application using qt 5.0 beta 2 crashes

    3
    0 Votes
    3 Posts
    2k Views
    Z
    Thanks for the advice, I will create a bug report, "QTBUG-28021":https://bugreports.qt-project.org/browse/QTBUG-28021 .