Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 457.9k Posts
  • Problem building when including a custom widget collection in Qt Creator

    9
    0 Votes
    9 Posts
    7k Views
    G
    Hello to everybody. I have the same problem of Deus Duke. I try to lead the same solution that Tobias suggest, but... don't works. Why? Here i explain my steps: I create a Qt Designer plugin that works fine in Qt Designer (KLineEditEx). I create a new Qt Creator project with this .pro file: @QT += core gui TARGET = $$qtLibraryTarget(Kwidgets) TEMPLATE = lib include(klineedit.pri)@ I create the klineedit.pri file: @INCLUDEPATH += C:/Documents and Settings/glafauci/Documenti/Programmi QT/KLineEditEx HEADERS += ../KLineEditEx/klineeditex.h SOURCES += ../KLineEditEx/klineeditex.cpp@ When I attempt to build this project, I have this answer from the compiler: @Running build steps for project KWidgets... Configuration unchanged, skipping qmake step. Starting: "C:/Programmi/Qt/2010.05/mingw/bin/mingw32-make.exe" -w mingw32-make: Entering directory `C:/Documents and Settings/glafauci/Documenti/Programmi QT/KWidgets-build-desktop' C:/Programmi/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory `C:/Documents and Settings/glafauci/Documenti/Programmi QT/KWidgets-build-desktop' g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -shared -Wl,--out-implib,debug\libKwidgets.a -o debug\Kwidgets.dll debug/klineeditex.o debug/moc_klineeditex.o -L"c:\Programmi\Qt\2010.05\qt\lib" -lQtGuid4 -lQtCored4 debug/klineeditex.o: In function `KLineEditEx': C:\Documents and Settings\glafauci\Documenti\Programmi QT\KWidgets-build-desktop/../KLineEditEx/klineeditex.cpp:49: undefined reference to `_imp___ZTV11KLineEditEx' C:\Documents and Settings\glafauci\Documenti\Programmi QT\KWidgets-build-desktop/../KLineEditEx/klineeditex.cpp:49: undefined reference to `_imp___ZTV11KLineEditEx' C:\Documents and Settings\glafauci\Documenti\Programmi QT\KWidgets-build-desktop/../KLineEditEx/klineeditex.cpp:49: undefined reference to `_imp___ZTV11KLineEditEx' C:\Documents and Settings\glafauci\Documenti\Programmi QT\KWidgets-build-desktop/../KLineEditEx/klineeditex.cpp:49: undefined reference to `_imp___ZTV11KLineEditEx' debug/moc_klineeditex.o:C:\Documents and Settings\glafauci\Documenti\Programmi QT\KWidgets-build-desktop/debug/moc_klineeditex.cpp:72: undefined reference to `_imp___ZN11KLineEditEx16staticMetaObjectE' debug/moc_klineeditex.o: In function `_static_initialization_and_destruction_0': Creating library file: debug\libKwidgets.a mingw32-make[1]: Leaving directory `C:/Documents and Settings/glafauci/Documenti/Programmi QT/KWidgets-build-desktop' mingw32-make: Leaving directory `C:/Documents and Settings/glafauci/Documenti/Programmi QT/KWidgets-build-desktop' C:\Documents and Settings\glafauci\Documenti\Programmi QT\KWidgets-build-desktop/debug/moc_klineeditex.cpp:64: undefined reference to `_imp___ZN11KLineEditEx16staticMetaObjectE' collect2: ld returned 1 exit status mingw32-make[1]: *** [debug\Kwidgets.dll] Error 1 mingw32-make: *** [debug] Error 2 The process "C:/Programmi/Qt/2010.05/mingw/bin/mingw32-make.exe" exited with code %2. Error while building project KWidgets (target: Desktop) When executing build step 'Make'@ What happens? Thanks to all.
  • [Moved] third party definition

    12
    0 Votes
    12 Posts
    6k Views
    ?
    moving to Desktop forum
  • [solved] QGraphicsView to fill main window with QT Designer

    7
    0 Votes
    7 Posts
    15k Views
    G
    That did it! Thanks. I had tried to set the layout on the central widget prior to adding the graphics view, but menus aren't active until at least one widget is added. Thanks again. Glenn
  • Creating Installer Package

    5
    0 Votes
    5 Posts
    6k Views
    Q
    I'm sorry for delay, thanks to all.
  • Events and QMacNativeWidget

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    8 Posts
    8k Views
    G
    Yes. You definitely want to avoid earth destruction :-) To be serious: There are several reaseon, among them: The memory allocation from new might not be the same as with malloc, so the pools are messed up if you mix them new/delete call the constructors/destructors of objects whereas malloc/free only give you a bunch of bytes without any meaning. You can find some more background infos in the "Freestore management":http://www.parashift.com/c++-faq-lite/freestore-mgmt.html Chapter of the C++ FAQ.
  • Plugins and Signal/Slot mechanism

    11
    0 Votes
    11 Posts
    15k Views
    G
    The qobject_cast to IToolbar should work without listing it in the macro. It's the same as if you inherited from QLabel. But why would you object_cast to IToolbar anyway? That's only needed if you downcast from a QObject pointer to an IToolbar pointer. You can always safely assign a plugin_Toolbar pointer to an IToolbar pointer thanks to inheritance.
  • QtWidgets should learn from ExtJS.

    20
    0 Votes
    20 Posts
    11k Views
    K
    I'm not entirely sure what You mean by merging. If you mean that the Trolls need to drop QToolButton and QPushButton and add a new class than that simply would be braking backward compatibility. But If You mean adding a new class that would have the functionality of both, than I can see this being some thing that could be added to Qt. But than why don't you write it your self and try making a contribution to Qt.
  • QByteArray.toUShort does not return the correct result...

    2
    0 Votes
    2 Posts
    4k Views
    D
    toUShort() method returns ushort from string representation stored in bytearray. So for you example you need to have "0x1223" in your bytearray.
  • QFrame paintEvent() and StyleSheet

    2
    0 Votes
    2 Posts
    4k Views
    M
    Ok, I find it out myself. Qt uses QWidgetPrivate to draw the background.
  • [MOVED] Embedding other windows to qt window

    3
    0 Votes
    3 Posts
    2k Views
    D
    Benjamin, moved :)
  • QMake and make with parallel jobs [bug?]

    8
    0 Votes
    8 Posts
    14k Views
    G
    I'm using qmake together with make -j8 on several projects for years without any hazzle (including speeding up compilation of my project in Creator). For me it's CMake that causes problems with parallel builds. But since I rarely use that, it's not a real issue for me.
  • Semi-transparent QFrame

    3
    0 Votes
    3 Posts
    6k Views
    M
    Thanks for the example. So I need to override the paintEvent.
  • [Moved] Blink a QLabel

    4
    0 Votes
    4 Posts
    8k Views
    ?
    Moved to desktop forum
  • Working with several QDockWidgets

    18
    1 Votes
    18 Posts
    18k Views
    M
    [quote author="genjix" date="1288186847"]Where can I ask whether it would be accepted if the code worked nicely?[/quote] Could start with a feature request at "http://bugreports.qt.nokia.com":http://bugreports.qt.nokia.com. Or find the developers on the #qt-labs IRC channel on irc.freenode.net for a chat.
  • I want make custom List Item

    4
    0 Votes
    4 Posts
    6k Views
    M
    Well, forget QListView. It's the last thing you want.. All you have to do is to create a new widget class. Then you create a layout class to layout the widgets in vertical or whatever you want. You don't have to make the layout class inherit from the QLayout things. Just make your own. It should be really simple. For example, you're making a twitter client. Then you can make a widget call EntryWidget. Then you create 100 of them. And use the layout class to position them. Oh, I forget to say maybe you need a QScrollBar..
  • QScriptable inheritance.

    2
    0 Votes
    2 Posts
    2k Views
    M
    It looks like the problem is qscriptvalue_cast() function. It does not understand that class C is also a class A since C inherits to A. And when I call A *p = qscriptvalue_cast<A >(thisObject()); where thisObject() is actually an object of class C, qscriptvalue_cast() returns 0. Still trying to fix that somehow, but with no any luck so far...
  • 0 Votes
    9 Posts
    9k Views
    F
    @Denis: That is probably the best way to go, but one kind of needs to know that it is actually a function when running into these types of issues.
  • QNetworkReply::isFinished()

    10
    0 Votes
    10 Posts
    6k Views
    G
    If you do not rely on a prebuilt Qt you can get the patch (there's a link to the git commit on the bugtracker) and apply it to your sources.
  • QToolBox overlapped on top of window

    9
    0 Votes
    9 Posts
    6k Views
    G
    yep, it's "free software":http://github.com/genjix/kartludox . I'm writing the server to be an IRC bot so people can easily host their own servers running games. And for real currency I'll setup one free service using "bitcoin":http://www.bitcoin.org/