Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • Purple Error in Widget Project

    17
    0 Votes
    17 Posts
    5k Views
    F
    Hmm.. now I am receiving a strange error: multiple definition of ui first defined here collect2: Id returned 1 exit status The lines in where the errors occur do not seem to be in my project, but in other files.. possibly library files? It's also strange, because I have defined my own ui just previously, and am wondering what is causing it now.
  • QApplication::setStyle

    3
    0 Votes
    3 Posts
    5k Views
    D
    I don't know why you want to manually set style to "macintosh", which is the default style of MAC already. And if you OS is not MAC, "macintosh" will not exist. Read the manual please.
  • Corresponding Qt function

    2
    0 Votes
    2 Posts
    1k Views
    N
    If I understand what you require, You got a parent item and you want to be able to add an item to its list of children? If so maybe this "addChild":http://qt-project.org/doc/qt-4.8/qtreewidgetitem.html#addChild and then you can use "indexOfChild":http://qt-project.org/doc/qt-4.8/qtreewidgetitem.html#indexOfChild to get the inserted item's index.
  • Drag'n'Drop with QListView

    2
    0 Votes
    2 Posts
    3k Views
    G
    You might need to (re)implement draMoveEvent() and dropEvent() too. Depending on your use case, dragLeaveEvent() too.
  • QTextEdit issue with implementing Search functionality

    4
    0 Votes
    4 Posts
    2k Views
    G
    setTextCursor copies the cursor. If you modify it afterwards you need to set it again.
  • XMLPatterns, QCoreApplications and the event loop

    3
    0 Votes
    3 Posts
    2k Views
    G
    In case the XML part needs to utilize the network for downloading some missing parts, it needs an event loop running - that's provided by QCoreApplication.
  • QTreeWidget

    2
    0 Votes
    2 Posts
    2k Views
    G
    You create a toplevel item. Insert this with "QTreeWidget::addTopLevelItem() ":/doc/qt-4.8/qtreewidget.html#addTopLevelItem or "QTreeWidget::insertTopLevelItem() ":/doc/qt-4.8/qtreewidget.html#insertTopLevelItem.
  • QMake doesnt do simple things in Windows

    9
    0 Votes
    9 Posts
    3k Views
    P
    Hi, The problem with it was solved. I made another solution, as you can see in the .pro file on github. Analysing the Makefile i see the variables that represent output dir for windows and solve the problem. Thanks.
  • DBus signal connection problem

    2
    0 Votes
    2 Posts
    2k Views
    K
    welcome to devnet Please "code wrappings":http://qt-project.org/wiki/ForumHelp#e3f82045ad0f480d3fb9e0ac2d58fb01 for your code. I have introduced them for you. As the warning suggests the "signal is not defined. ":https://qt-project.org/doc/qt-4.8/qdbusinterface-members.html Did you also upgrade from Qt3 to Qt4? I doubt that in an earlier Qt4 version this signal was available.
  • Simple FTP client

    14
    0 Votes
    14 Posts
    20k Views
    ?
    Thanks, I will try that and see what happens.
  • When and how does the Qt assistant use libQtDbus?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • QString shows garbage characeter

    10
    0 Votes
    10 Posts
    6k Views
    N
    I got the issue. One application written the file in ANSI format that is why it is not able to decode it. Anyway thanks for your support. One more thing i want to know is if i already had applied codec for UTF-8 and if i want to apply the codec for another ISO then can i apply two times after one already set ? @ QTextCodec *codec = QTextCodec::codecForName("UTF-8"); QTextCodec::setCodecForCStrings(codec); QTextCodec::setCodecForTr(codec); @ after above code i want to apply same with ISO type. can i set ? i am not able to set ? How to do that ?
  • [solved] Does QByteArray free memory on it's own accord?

    3
    0 Votes
    3 Posts
    4k Views
    L
    Damn, I knew that functionality was implemented somwhere else ;) You've got a point with using append(...) - and now that I think about it it's obvious that QByteArray can not free the memory on it's own... If you are working too long on a piece of code you miss the forest for the trees :) Thanks for the clarification!
  • [SOLVED] PostgreSQL linker error

    6
    0 Votes
    6 Posts
    5k Views
    M
    I add dependence to dll's which contains at the PostgreSQL/bin folder, and driver start work. tnx a lot All 4 help!
  • Signal released() not working

    6
    0 Votes
    6 Posts
    5k Views
    S
    Hi, You can try the following code for your requirement @QString myButton3StyleSheet; myButton3StyleSheet += "QPushButton { image: url(D:/solar4000/QT/images/power.png); border: 1px solid black;}"; myButton3StyleSheet += "QPushButton::pressed { image: url(D:/solar4000/QT/images/power-whenclicked.png);}"; ui->myButton3->setStyleSheet(myButton3StyleSheet);@ Instead of directly hard-coding the path you can create a .qrc file and store your images in resource folder. "Creating Resource files":http://www.voidrealms.com/viewtutorial.aspx?id=184
  • QDockWIdget title & body overlapping

    5
    0 Votes
    5 Posts
    2k Views
    I
    even if your solution works it just means that you solved my mockup exactly :) But the real thing I need is the title overlaps with body. So it should work in general not just for the border
  • Insert a Qt Gui into an existing C++ project

    8
    0 Votes
    8 Posts
    7k Views
    G
    [quote author="MuldeR" date="1335282076"]... But I think as long as the "main" application doesn't run an event loop yet, you can create your own in the DLL. However I think this will only work properly, if the "main" application calls your DLL function from its main thread...[/quote] But this will block the main function of the app. QApplication::exec blocks till the event loop should be stoppped, which means, the last UIs are closed.
  • QAxObject wrapping a IUIAutomation object

    3
    0 Votes
    3 Posts
    2k Views
    S
    Ok. I will do so! An regarding the technical issue... no idea? Anyone? If this isn't possible I would be happy about a confirmation so I could write a suggestion.
  • Forbid caracters which aren't numerical in a QStandardItemModel

    10
    0 Votes
    10 Posts
    5k Views
    O
    But I set data in my program and they are numerical. I don't understand why when I try to edit one I can write alphabetic characters. In this case, the validator doesn't work correctly.
  • Quit qmusicplayer.app with crash message

    2
    0 Votes
    2 Posts
    1k Views
    L
    If your Qt application crashes on exit this is possibly because it tries to delete an object that is already deleted. Qt hast some kind of clean-up mechanism by using the parent-pointers that every QObject has. If you delete a QObject all its children will be destructed first. If there's some inconsistency in the object tree, because any object has the wrong parent or if you manually destructed an object that is a child of another object you may get a crash on quitting the application. These two happen to me now and then. I'd check if there's one of these two cases. As I am not familiar with MAC OS X I don't feel like I could be of help with that crash report.