Is subclassing acceptable container?

I was reading under the order reference:

https://developer.BlackBerry.com/Cascades/reference/bb__cascades__control.html

.. .that custom controls must be used instead of subclassing of existing controls.  This applies to containers?

Are there examples showing how to subclass a container?  When I try to write the header of the class, I get a bug stating:

Class "[C@1c3afaa' has virtual 'qt_metacall' method but non-virtual destructor]"

I guess I could skip the constructor/destructor, but I'd rather not

It works perfectly:

#ifndef DROPDOWNCONTAINER_H
#define DROPDOWNCONTAINER_H

#include 
#include 

namespace bb
{
    namespace cascades
    {
        class Label;
        class DropDown;
    }
}

class DropDownContainer : public bb::cascades::Container
{
    Q_OBJECT
public:
    explicit DropDownContainer(Container *parent = 0);

    void setTitle(const QString &title);
    void setDescription(const QString &description);
    bb::cascades::DropDown *getDropDown();

signals:

public slots:

protected:
    bb::cascades::Label *titleLabel_;
    bb::cascades::Label *descriptionLabel_;
    bb::cascades::DropDown *dropDown_;
};

#endif // DROPDOWNCONTAINER_H

BTW, it is recommended to use names in the header files and use only «using namespace...» "in the .cpp files.

Tags: BlackBerry Developers

Similar Questions

  • FF sometimes emits malformed requests (Accept-Language contains a line break) == > error 400

    A few days ago, I started to get 400 errors on some sites (not all). I would get errors of

    -snip-
    Bad request

    Your browser has requested that this server could not understand.
    Request header field is missing ':' separator.

    q=0.8,en-CA-x-Rogers;q=0.8,en-IE;q=0.7,it-it;q=0.7,it;q=0.6,es-ES;q=0.6,ES;q=0.

    -snip-

    I discovered that FF was sending a malformed request - notice how the Accept-language header is broken by a single line break. (I have fact/r and / n visible.)

    -snip-
    GET / HTTP/1.1\r\n
    Host: www.thestar.com\r\n
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; RV:17.0) Gecko/20100101 Firefox/17.0\r\n
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n
    Accept-Language: en-US,en,en-ca;q=0.9,en-gb;q=0.9,fr-FR;q=0.9,fr;q=0.8,fr-ca\n

    q=0.8,en-CA-x-rogers;q=0.8,en-IE;q=0.7,it-IT;q=0.7,it;q=0.6,es-ES;q=0.6,es;q=0.6,ko-KR;q=0.5,ko;q=0.5,is-IS;q=0.5,is;q=0.4,de-DE;q=0.4,de;q=0.4,cs-CZ;q=0.3,cs;q=0.3,ru-RU;q=0.3,ru;q=0.2,ca-AD;q=0.2,ca;q=0.1,en-AU;q=0.1,pl-PL;q=0.1 pl;q=0.0\r\n

    Accept-Encoding: gzip, deflate\r\n
    Connection: keep-alive\r\n
    \r\n
    -snip-

    I tried the suggested steps: empty the cache/cookies/active connections/off line data Web site closed FF, deleted the file cookies.sqlite, rebooted. The problem persists. The only clue is the Accept-Language malformed header.

    It's not fun to have a paralyzed FF. Thanks for your help.

    Must you really all these languages?

    Tools > Options > content: languages-> choose

  • Necessary to remove the container referenced by QObject subclass?

    MyClass creates and maintains a reference to a container, it creates:

    m_container = new Container();
    

    At some point, the container is added to a page and set as root.

    Later in the application, I want to delete the Page and MyClass.

    I need to remove the container in the destructor of MyClass or the Page doesn't do that automatically?

    This only applies to functions which do it explicitly. They usually have something like this in docs:

    void setContent (bb::cascades::Control *content)
    
    Set the content of the Page.
    
    Ownership will always be transferred to the Page.
    

    internally, he did something like this:

    void setContent(...)
    {
      content->setParent(this);
      ...
    }
    

    So I can delete m_container even if it is owned by the Page?  I do this in a test application, and it hangs when I remove it.

    Seems that I misinformed you once again.

    If the class is designed for this (for example subscribed QObject destroyed() signal and resets it's internal references to the object) it works.  I tried with TabbedPane and the middle tab page just disappeared:

       Tab *t;
        tabbedPane_ = TabbedPane::create()
                .showTabsOnActionBar(true)
                .add(Tab::create() [skipped]
                .add(t = Tab::create() [skipped]
                .add(Tab::create() [skipped]
                ;
        delete t;
    

    Deleting the object must reset the parent, but not the references to the object it seems, it is preferable to delete explicitly before deletion.

    p. s.

    Technically, any QObject-derived class can be one parent to other classes derived from QObject.

    You can explicitly set the parenting:

    obj1-> SetParent (anyOtherQObject)

    p.s.s.

    Can you please send the test code? I'll watch if the crash might be caused by other problems.

  • Please help - I don't understand this: because iPad can contain only the content of five Apple ID.

    I give my son my iPad.

    I try to download Apps on it and I get the message: some of the files in the iTunes Store iTunes library were not copied to the iPad because iPad can contain only the content of five Apple ID.

    As far as I know there are only 2 Apple ID involved - my own and the one we did for him as a minor.

    If someone has had this problem and can you help me to overcome.

    It is typical that this situation happens the day before her birthday - I wanted to give him tomorrow all loaded with his own stuff. It five of its apps accepted last month when I first came with the idea and now...

    Anyone?

    This means what it means: iTunes Store items are tagged with the Apple that was used to buy ID. Apparently in this case, for some reason, over 5 ID are involved. Which could include accounts that are no longer used.

    In general, it is best to follow these steps before giving your iPad to someone else: what to do before you sell or give away your iPhone, iPad or iPod touch - Apple Support

  • I'm about to order an iphoto Mac book I did.  I can't place the order because it said that some executives do not contain an image.  ALL the images in my book have one photo in them!  Help!

    I'm about to order a Photo book.  It does not place the order because it tells me that some pages contain images without a photo.  I checked carefully and all frames are filled.  Why can he not accept my order?

    With iPhoto? or Photos? If it is iPhoto, you know that abandoned Apple books photos and other documents printed for iPhoto and Aperture at the end of March, right?

  • Want to only cookies for exception. I uncheck the 'Accept cookies' & close and leave FF. The next time FireFox opens, the verified again accept cookies. What gives?

    I set privacy options
    -Indicate the sites I want to be the subject of a follow-up
    -Use the custom settings for history
    -Clear history of Firefox closing
    (I said websites to accept cookies from the exceptions)

    When Firefox starts again, the "accept cookies" is checked once again, against my will.

    Thank you

    Hello ChasDuby, the following article contains a fix for the problem you described? : How to fix preferences that will not save

  • Norton advised I remove container.exe, I did, now, everything I've done on Firefox causes an accident, so can I reinstall or what and if so, how?

    My Norton security has opened a window and told me that he recommended the quarantine or delete something called "container.exe" as it was then very little new people had used, or something like that. I accepted their advisor. Immediately I started having problems with Firefox crashing almost everytime I went to a new Web site. I tried to restart, but it was ineffective. Any suggestions? I do this on google chrome for my Firefox is basically unworkable at this time.

    The container is used by Firefox to contain the plugins used by Firefox.

    If you start Firefox, you might want to try and perform a soft reset of Firefox: http://mzl.la/MnSTZB

    If this does not work, you should be able to download Firefox again, install it and use it without losing any important data.

    Before you do anything, like install Firefox again, you must make a backup of your Firefox profile: http://mzl.la/LHJo6V

  • Container plugin consumes massive system resources

    When I play flash games on facebook, I noticed after a few minutes my computer seems slow down and continues to be.
    When I looked in the Task Manager, plugin - container.exe uses up to 1.2 GB of my memory.
    For example, the time I have more Castleville running, it falls to about 40 MB, which is much more acceptable.

    Prior to version 10 of Firefox, I could disable the plugin-container, but now the option seems to disappear in version 11.
    Please help, I want to disable my computer can function normally. It's crazy that I can't have just that one tab open, to play Castleville for 5 minutes before it happens a little stuck.

    I tried the suggestions for [[high memory usage | https://support.mozilla.org/en-US/KB/High%20memory%20usage]], but it did not help or already made before playback.
    My Flash is up to date (11.2.202.233), Firefox is 11.0.

    Any help would be appreciated to disable / restrict the plugin-container.

    melbmonkey wrote:

    Any help would be appreciated to disable/ limit the plugin-container.
    1. Type of topic: config in the address bar and press ENTER.
    2. Press the big button to ignore the warning.
    3. In the filter bar, paste dom.ipc.plugins.enabled
    4. In the lower pane, double-click dom.ipc.plugins.enabled to set its value to false.

    Warning

    This will disable any out-of-process plug-ins. The problem is that, in order to disable Flash Player specifically, you must create a Boolean preference named dom.ipc.plugins.enabled. < Filename > and set it to the value false. But the name of the file depends on the version, and Flash Player is updated frequently (for example, it's now called NPSWF32_11_2_202_233.dll). So except if you plan to create a new preference and reset the old one whenever you have updated Flash Player, deactivation of all out-of-process plug-ins is the way to go.

    For more information, see

    If the preference is reset after restarting Firefox, see

  • I opened 2 emails that were in the folder spam from my email and that each contained an attachment zip 2 k and 3 KB. As I could not open directly in my email, I opened the zip files with the "open in" another app option. At the opening of th

    I opened 2 emails that were in the folder spam from my email and that each contained an attachment zip 2 k and 3 KB. As I could not open directly in my email, I opened the zip files with the "open in" another app option. When you open the zip files at this other app asked me if I wanted to extract zip files in a new folder, I have accepted, in both files .js (javascript) files there. I opened these .js inside this same application files and content files white text on black background and that seems to be a script file. My question is: my iPad Air has been compromised by a scam of viruses, such as the Trojan horse thieves and banking password especially as Dridex or Dyreza, the Trojans and ransomware as Locky, cryptolocker, or Teslacrypt. If that were the case, then what is the solution to get rid of these... Thank you.

    Simply delete them. It is not possible to install anything on iOS using this method. For good measure, you can remove and reinstall the application allowing you to open it with, but I don't really have that is actually needed.

  • How to get rid of a popup "to accept incoming network connections.

    Since the upgrade to El Capitan, I get a popup message asking "do you want the"?. " App"to accept incoming network connections? a yellow container triangle one exclamation point.

    It is to appear with multiple applications.  I have searched through all system settings and can't find any way to disable it.  2 sec Deny or Allow always generates it popping up again when the application is restarted.  No idea how to disable this?

    The specific option is managed by your security (as indicated by the message) preferences: preferences system-> Security & privacy-> firewall.

    Under Firewall Options, you have the ability to control/deny incoming connections for individual applications.

    The approach of brute force to stop the messages would be to disable the firewall completely, but that wouldn't be better. Instead, it may be sufficient to add the word to the list of allowed applications (although it is not clear to me at this moment why Word would need incoming connections, or why access is not complete this list).

  • Why property nodes are not accept input?

    Well, this one is driving me crazy.  I have a Subvi, which contains a string indicator and a drop-down list box, as well as a few buttons on the front panel.  My problem is that when I run the program (in LabVIEW, not an exe file) sometimes the window Question (the light) accepts the string and updates the property of Caption.Text, sometimes it doesn't.  At the same time, sometimes the answer box (combo box) accepts the Bay of cluster in it is StringsAndValues well, sometimes it doesn't.  They both either work, or they do not.  Never a problem with accepting Question window indicator string.

    The block diagram:

    Here is an example of the code powering the Subvi.

    I don't get any kind of error message.

    Sensors at the entrance of the property offending nodes indicate that the correct data are happened to them, it is just 'ignored '.  Once it starts to spoil, it usually continues to do.

    It seems that the only way I can get to behave correctly should quit LabVIEW, and then restart LabVIEW and run the vi.  Then it will usually works a few times until it starts to work.

    (Win 7, LabVIEW 9.0f3)

    Thoughts?

    THX

    What is the source of the wire that goes into your sub - VI Q & A mistake?  Is it possible that you have found errors on this thread?

    If there is an error, these property nodes will not run.

  • HP photosmart b110a: does not accept my password

    tried to print from the ipad, could not. printer does not accept my wpa password. Help.

    Hi @goldilocks45and welcome to the Forums of HP!  I'd be happy to help you yo configure your printer to your network so that you can print from your iPad. Is WPA type encryption, or perhaps you have WPA2? I ask about the type of encryption, because I saw a problem recently with the secret codes WPA2 which seems to be from some routers and firmware updates.

    Have you tried the printer on the network in the past, have you recently changed your password? Is your password contains special characters that maybe the printer does not? Are adjust you upper and lower case?

    I can't wait to hear back on your part!

  • Impossible to install my dvd containing the update of wordperfect files

    The dvd contains files converted wordperfect X 5 but does not contain a Setup program or any program exe and microsoft will not accept. All the answers?

    You need a program that can read or modify files WordPerfect.  The files themselves will do you any good without a program that can open or edit them, and there are none that comes with Windows that can open or edit them.

  • 'System.DateTime' does not contain a definition for 'HasValue '.

    I develop a lightswitch application. But me make mistakes trying to build the application:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.LightSwitch;
    namespace application
    {

    partial public class Section
    {
           
    SectionDisplay_Compute partial Sub (Ref DateTime result)
    {

    If ((this. Course! (= null) & (StartDate! = null) & (teacher! = null))
    {

    Assign the result to the value of the desired field

    result = String.Format ("{0} ({1}) [{2} - {3}]", Course.CourseName, Teacher.UserName, StartDate.ToShortDateString (), ((StopDate.HasValue)? ") StopDate.Value.ToShortDateString (): "'));

    }

    }
    }
    }
    This is the code. Get the following errors

    Error 1 'System.DateTime' does not contain a definition for 'HasValue' and no extension method 'HasValue' accepting a first argument of type 'System.DateTime' could be found (missing are you a using directive or an assembly reference?)
    Error 2 'System.DateTime' does not contain a definition of 'Value' and no extension method 'Value' accepting a first argument of type 'System.DateTime' could be found (missing are you a using directive or an assembly reference?)
    anyone help me please in this ASAP?

    Hello

    What operating system is installed on the computer?

    The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums. You can follow the link to your question:

    http://social.msdn.Microsoft.com/forums/en-us/categories/

    Hope this information helps.

  • How to connect a container ActiveX to a chain of Format Date/time control

    Hello

    I have an ActiveX container with the Date of Microsoft & Time inside selector object. I am trying to connect to control of the Format Date/time string. When I do that, it gives me an error saying: "You have connected a polymorphic terminal that cannot accept this type of data."

    What should I do?

    Kind regards.

    Is that what you want to do?

Maybe you are looking for